Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jun 2010 19:19:11 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Alberto Villa <avilla@freebsd.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: portmaster: problem with --packages-build?
Message-ID:  <4C14401F.6080704@FreeBSD.org>
In-Reply-To: <201006130210.11565.avilla@freebsd.org>
References:  <AANLkTikL28i6aMUB7tf9vXrIZpyBiffPMANXx-nnEOxg@mail.gmail.com> <201006120057.13163.avilla@freebsd.org> <4C141AE3.2000409@FreeBSD.org> <201006130210.11565.avilla@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06/12/10 17:10, Alberto Villa wrote:
> On Sunday 13 June 2010 01:40:19 Doug Barton wrote:
>> No hurry for testing, I found some good test cases locally and was
> able
>> to confirm that the new code works to detect this problem so I
> committed
>> it to the ports version (2.29).
>
> i just saw the e-mail, so i wasn't able to test it before :)

No problem. I initially thought it would be more difficult to fix than 
it actually turned out to be, so I was able to devote some time to 
writing the fix and then regression testing it (the latter part is 
usually the complicated bit).

> i have only one question: what if the port is listed only in build
> dependencies but is installed because i want it installed (of course,
> portmaster cannot know why a port was installed)? will it get
> removed?

The list of ports for --delete-build-only and/or --packages-build (which 
use the same code to build the list, FWIW) is still calculated on each 
portmaster run. So let's say you have gmake installed already, and it is 
a build-only dependency on the current portmaster run. If gmake is up to 
date (i.e., portmaster doesn't need to do anything to it) then it will 
simply be used, and not deleted when you're done. The way the code 
stands now, if you already had it installed (or for that matter, if you 
did not have it installed, but it was a build-only dep for something 
else in the current run) then it would be installed/updated, then with 
--delete-build-only it would be deleted at the end of that portmaster 
run.[1]

To answer your question more directly, there is currently no provision 
for the idea of "this port is a build-only dependency but I do not want 
--delete-build-only to mess with it." The update today doesn't change 
this, it only addresses the issue of not treating something as a 
build-only dep on _this_ run if it is listed as a run dependency for 
something else that is already installed.

I'm not sure that the complexity of the extra code required to exempt 
ports from --delete-build-only is justified. If I were a typical FreeBSD 
user I would probably use the combination of --packages-build and 
--delete-build-only, perhaps along with a local package repo so that I 
could build my own custom versions of those tools that I cared about. As 
long as the packages are up to date, they don't have have to be 
refetched each time you build a port so there is only a small delay when 
the build dep is installed. The reason I don't do this personally is 
that when I'm working on updating the ports that I maintain it's more 
convenient for me to already have the typical tools installed.


hth

Doug

[1] There is another case of multiple ports on the command line, such as 
'portmaster thing-that-has-gmake-as-a-build-dep gmake'. In that case, 
portmaster already has code to prevent gmake from being treated as a 
build dep.

-- 

	... and that's just a little bit of history repeating.
			-- Propellerheads

	Improve the effectiveness of your Internet presence with
	a domain name makeover!    http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C14401F.6080704>