ports/158179: some packages do not fully honor -P dir option in pkg_add(1)

Lowell Gilbert freebsd-ports-local at be-well.ilk.org
Tue Jul 19 21:40:10 UTC 2011


Baptiste Daroussin <bapt at FreeBSD.org> writes:

> On Tue, 19 Jul 2011 18:41:31 +0000, Dieter BSD wrote:
>>> 1.  Spell out very clearly its purpose - is it to populate a jail,
>>> for
>>> example?
>>
>> Populating a chroot/jail is one purpose.
>>
>
> Corrupting the pkgdb there is a chroot option for that

You would need to set the DBDIR to manage the databases properly (which
makes sense because there really is a separate set of ports living in
the jail).  I agree about the chroot option, though; I do not see any
reason that one would ever use -P rather than -C for populating a jail
from the outside.

>> Another is to test a new version of a package without messing up the
>> existing version.
>>
>
> it will mess up the database either

One would just use a different database.  As I said, that makes sense.
This thread has already heard from one person who successfully uses the
"-P" option for this purpose, so it's definitely useful to someone.

>> There are bound to be other reasons.
>>
>> Compiling the port rather than installing a package isn't always
>> a solution.  Many ports are incredibly difficult to get compiled.
>>
>> PREFIX needs to be an install time variable, not compile time.
>
> PREFIX at install time is just broken and can't be anything else than
> broken, because lot's of path given a build time configuration path
> for example, etc.

Yes.  In general, packages just can't be placed anywhere other than
where they were built for, and we can't do anything about that in the
ports infrastructure.  


More information about the freebsd-ports mailing list