Keep tuning the upgrade script pkgdb1 to pkgdb2