CVSROOT:        /cvs
Module name:    src
Changes by:     t...@cvs.openbsd.org    2025/05/06 12:36:20

Modified files:
        usr.sbin/pkg_add/OpenBSD: AddDelete.pm PkgAdd.pm PkgDelete.pm 
                                  Update.pm 

Log message:
Fix quirks handling in pkg_add -u

As noticed by tb@, there is a bug in pkg_add where it runs an outdated
version of quirks during an update. This is a side-effect of separating
the updatedb in a different set: since the other set is not tagged "quirks"
then the safeguards to prevent running quirks early won't trigger, and thus
quirks will be loaded from the older installed version.

The following patch takes a different approach: instead of excluding the
quirks set from loading quirks, we only allow loading quirks once we're
sure it's up-to-date (or as up-to-date as it can be, since pkg_delete won't
try to do anything to it).

This leads to somewhat cleaner code, as all the "don't do this to quirks"
exceptions can disappear, thus removing a few tests.

from espie

Reply via email to