Using pkg with build options

Polytropon freebsd at edvax.de
Sun Mar 23 17:53:32 UTC 2014


On Sun, 23 Mar 2014 17:11:52 +0000, Matthew Seaman wrote:
> On 23/03/2014 14:01, Polytropon wrote:
> > On Sun, 23 Mar 2014 13:53:09 +0000 (UTC), Darrell Betts wrote:
> >>    Currently have FreeBSD 9.2 installed. I would like to start using pkg
> >>    install but I can't find how to use it with build options like the old
> >>    make install clean method. Can anyone share a light on this?
> > 
> > Basically, you cannot do this. The new pkg obsoletes the
> > traditional pkg_* tools which operate on binary packages
> > which get built (by FreeBSD build systems) using the
> > corresponding port's default settings.
> > 
> > If you need to use custom-configured packages (build via
> > "make install clean" or using a port management tool
> > such as portmaster), this does currently not integrate
> > that well with pkg. However, "poudriere" is a solution:
> > You build packages with your own options and can _then_
> > use that package source with pkg.
> > 
> > Here's a summary: https://wiki.freebsd.org/PkgPrimer
> 
> Err... what?

I didn't write anything that contradicts to your or
Warren's reply. :-)

The conversion from pkg_* to pkg (pkgng) is easy as
you did describe it.



> Once pkgng-ized, the experience with installing from ports is basically
> exactly the same as with pkg_tools.  ie. it does some stuff behind the
> scenes to register packages in the package database on installation, but
> you never have to worry about it or invoke it directly.

The ports infrastructure will interact with pkg in
the same way as it did with the pkg_* tools (for
example keeping the package database, even though
it's a different database). Additional management
tools (like portmaster) also keep working the same
way.



> You can twiddle port options to your heart's content and pkg will be
> perfectly happy.
> 
> The difference comes when you want to look at the contents of your
> package database.  'pkg info -fa' shows you somewhat more than the
> pkg_info equivalent, including what OPTIONS settings were used to
> compile each package.

In my (limited) experience, problems can arise when
a port has been compiled with nonstandard options,
or a port has been installed that doesn't have a
corresponding binary package available from the
default package source; in this case, using pkg to
binarily update the installed applications will
(corretly) error.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list