Problems with +CONTENTS being messed up by pkg_delete -f

Thomas-Martin Seck tmseck-lists at netcologne.de
Fri Jul 20 18:27:08 UTC 2007


* Alexander Leidinger <Alexander at leidinger.net> [gmane.os.freebsd.devel.ports]:

> Quoting Robert Noland <rnoland at 2hip.net> (Thu, 19 Jul 2007 13:31:42 -0400):
> 
>> Ok, so the issue that I hope to address is not really a "portmanager"
>> issue.  The original version of package-depends always listed the
>> current version (from ports) in the +CONTENTS file.  When that list was
>> passed to sort -u, you ended up with a single dependency for each
>> origin.
>> 
>> The new way it takes each direct dependency and adds those, then
>> recursively parses the +CONTENTS file of each of those and adds those
>> entries and finally passes the whole thing to sort -u.  This allows for
>> multiple dependencies with the same origin to be listed in the +CONTENTS
>> file.
>> 
>> As an example... port a depends on b and c.  Port c has a version bump
>> and is updated but technically b doesn't require an update.  Now if port
>> a is updated it will get the current version of c and also the old
>> version of c from b.
> 
> Ok, I see the problem (in case b depends on c too). This is only an
> issue if you do this by hand instead of using portupgrade (or something
> else), as those tools should correct the dependency in port b to the
> new version of c. If they don't do it, it's a bug in those tools.

Oh not at all. This will also happen if you install dependencies via
packages when these packages' dependencies do not exactly match what you
have presently installed. 

Example:

package a-1.0 has a recorded dependency on b-1.0. Meanwhile, b got
upgraded to 1.0_1.
You have b-1.0_1 installed locally and then install port c which depends
on a and use a's package in order to save build time (imagine a being
something in the firefox/xorg-libs range with USE_PACKAGE_DEPENDS set in
your make environment). Hilarity ensues. The old algorithm could recover
from this I guess.

It looks like one is forced to repair the package db with external tools
everytime one does not install from source and from scratch.



More information about the freebsd-ports mailing list