Fix a couple of bugs in the handling of externals in upgrade.
Fix a couple of bugs in the handling of externals in upgrade.


tpkg/pkgs,tpkg/server,tpkg/server,jaeheung90/tpkg-client,jaeheung90/tpkg-client,tpkg/client,tpkg/client,tpkg/client,tpkg/pkgs,tpkg/pkgs,jaeheung90/tpkg-client,tpkg/server