portmaster patch for testing CONFLICTS and dependency list (Was: Re: portmaster and dependencies)

Doug Barton dougb at FreeBSD.org
Thu Aug 24 20:52:00 UTC 2006


B Briggs wrote:
> After reading some of the comments on a prior thread about "the best" 
> port update tool, I decided to give portmaster a look.

Thanks!

> Unfortunately my ports were up to date except for openoffice.org-2.0
> which I had listed as HOLD_PKGS in pkgtools.conf. Anyway, I let it run
> and it stopped because it wanted to install linux-sun-jdk14 (You get the
> manual fetch message in IGNORE=), which I had only used as a bootstrap to
> get the native jdk15 installed, then later removed the linux version and
> its distfile.
> 
> Looked back at prior threads and it looks like someone mentioned this 
> about 3 weeks ago.

I seem to have missed this message, sorry about that.

> I was just wondering if there was any progress along these lines.
> 
> FWIW, I changed the script on line 435 from dep_port_list=`make
> $MAKE_ARGS all-depends-list` to dep_port_list=`make $MAKE_ARGS
> run-depends-list && make $MAKE_ARGS build-depends-list`

That's a very interesting idea, which I have now done some testing on (with
a slightly different version of the patch). An examination of the code in
bsd.port.mk indicates that not only should this work, it also has several
advantages. Not the least of which is that it should be faster, and it
should avoid building dependencies that the user doesn't actually need,
either because of the case you documented here, or because 'make config' in
a dependent port would eliminate the need for that port. Frankly, I wish
I'd thought of this. :)

> The author might want to look at this; he'll know much more about it and 
> can probably tell right away if this is going to break some other 
> functions of the script. I already know that the two depends-lists will 
> have duplicates, but it doesn't seem to affect any builds.

portmaster already has code to avoid doing duplicate dependency checking,
but in this case it's easy to avoid getting the duplicates in the list, so
it saves that much more effort.

> I know just enough about the ports system to be dangerous. Anyway, I've 
> been playing with it for a couple of hours now removing and reinstalling 
> ports with portmaster, and I haven't run into any problems so far. And I 
> want to say that I really like portmaster.

Thanks again!

> I'll probably stick with it and remove portupgrade and ruby, but I'm
> going to miss pkg_which: Is there any replacement?

pkg_info -W

I've created a patch that has the dependency list change, plus the
experimental work I'm doing on trying to handle alternate dependencies via
CONFLICTS. It's at http://dougbarton.us/portmaster-conflicts-depends.patch.
I would appreciate it if folks could at least test the dependency list hunk
of that patch, and report back if they have any problems. As I said, it
_should_ work, but it's a non-trivial change and I don't want to screw
things up for anyone.

Doug

-- 

    This .signature sanitized for your protection



More information about the freebsd-ports mailing list