tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

+REQUIRED_BY files can get out of sync (was Re: Permanent fix for vim?)



On Thu, 12 Jul 2018, at 14:44:43 -0400, Greg Troxel wrote:
>Certainly the +REQUIRED_BY files can get out of sync due to various
>troubles, none of which should happen.  If you mean that you have a
>repeatable way to provoke that, that's useful in tracking down a
>problem.

I'm aware of one such repeatable issue, which is an interaction
between pkgtools/osabi and pkgtools/x11-links. There are two caveats
to reproduce it. First, one must have first upgraded a system such
that the result of "uname -r" changes. (As NetBSD 8.0 was just
released, and -current just had a version bump as well, now's a good
time to mention it.) The second is that x11-links must also be out
of date.

It can be demonstrated by this sequence:

(1) Run "make replace" in osabi, in recognition of the fact it needs
to be bumped, post-system upgrade. It will warn about an issue with
x11-links, e.g.:

pkg_add: Dependency of x11-links-1.06 fulfilled by osabi-NetBSD-8.99.2,
but not by osabi-NetBSD-8.99.22

(In this example, I've just been updating a rather old VM image.)

(2) Run "make replace" in x11-links.

(3) Examine the +REQUIRED_BY file now in /var/db/pkg/osabi*. Note
it lists both the old version and the new version of x11-links,
rather than just the new version that replaced the old one.

(4) Remove x11-links.

(5) Attempt to remove osabi, without "-f". pkg_delete will prevent
this, since the +REQUIRED_BY file in osabi still contains a reference
to the old version of x11-links.

Regards,

Dave


Home | Main Index | Thread Index | Old Index