Subject: false entry in +REQUIRED_BY
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 07/24/2002 10:52:27
Hi all,

Can somebody riddle me this?

I have a package A, which depends on package B.  'make install' for A
pulls in B and installs just fine.  /var/db/pkg/B/+REQUIRED_BY now
contains a line for A.

Trying to deinstall B doesn't work, of course.  Good.
Deinstalling A works fine.
Reinstalling A works fine.
pkg_delete -r B works fine (and naturally removes A)

pkg_delete A works fine, but pkg_delete B afterwards does not.  It
complains that B is required by A (even though I uninstalled A), and in
fact, I do still find the entry for A in /var/db/pkg/B/+REQUIRED_BY.

Error message: 
pkg_delete: unable to change directory to /var/db/pkg/A

(Of course, A has been removed, so there is no longer any /var/db/pkg/A)

Only manually removing it allows me to deinstall B.

Can anybody think of a reason why the relevant entry in +REQUIRED_BY is
not removed?

Thanks,

-Jan
-- 
I believe the technical term is "Ooops!"