Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run "pkg_admin rebuild-tree" after pkgdb changes.
There are a number of known issues with +REQUIRED_BY files getting out of sync when performing forced upgrades or replacements as pkgin does. These lead to infamous "Can't open +CONTENTS of..." errors when next attempting to upgrade, as +REQUIRED_BY files contain entries for packages that no longer exist. Attempting to fix pkg_install to ensure correct consistency during replacements is difficult, and there's no guarantee that the installed pkg_install tools would have any future fixes, and so a simpler workaround for pkgin for now is to simply rebuild all the +REQUIRED_BY files after each upgrade. With recent proposed changes to pkg_install this operation has been improved, and so the additional runtime (less than 1 second for most situations) should not be noticeable for most users. Resolves errors seen in TritonDataCenter/pkgsrc#158, TritonDataCenter/pkgsrc#190, TritonDataCenter/pkgsrc#256 and many other ad-hoc reports.
- Loading branch information