Problems with +CONTENTS being messed up by pkg_delete -f

Helge.Oldach at Helge.Oldach at
Thu Jul 19 07:30:27 UTC 2007

Stephen Montgomery-Smith:
> If you "pkg_delete -f" a package and then install the port again (but
> after it has been bumped up a version), then the +CONTENTS of ports that
> require the original port will be incorrect.  This apparently messes up
> programs like portmanager.  There is a sense in which one should never do
> "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the
> other hand this is exactly what "make deinstall" does.
> My feeling is that the integrety of /var/db/pkg should be maintained
> across a "make deinstall" and subsequent "make install" of a bumped
> version of the port. 

The tricky point is when the dependencies change with a version bump. It will
also be difficult if the user changes "make config" options (which commonly
affect dependencies - consider my favorite WITHOUT_NLS knob) and reinstalls.

My feeling is that tackling this with a general solution would be nice to
have - but the details and corner cases are pretty difficult.

> A further benefit of this approach is that one could also accurately
> reconstruct the +REQUIRED_BY of the port just reinstalled - right now this
> is left empty and thus inaccurate.

Well. This is true, but on the other hand +REQUIRED_BY basically just duplicates
information that we already have in the ports tree. Most ports management
packages that we have (including my homegrown perl script) don't rely on
information contained in +REQUIRED_BY, but just start with what is already
in the ports tree.

Which leads to the question whether +REQUIRED_BY is still of much value at all...


Atos Origin GmbH, Theodor-Althoff-Str. 47, D-45133 Essen, Postfach 100 123, D-45001 Essen
Telefon: +49 201 4305 0, Fax: +49 201 4305 689095,
Dresdner Bank AG, Hamburg: Kto. 0954411200, BLZ 200 800 00, Swift Code DRESDEFF200, IBAN DE69200800000954411200
Geschäftsführer: Dominique Illien, Handelsregister Essen HRB 19354, Ust.-ID.-Nr.: DE147861238

More information about the freebsd-ports mailing list