Reorganize pkg_add slightly.
Fix upgrade.