Does poudriere remove unnecessary packages?

Matthew Seaman matthew at FreeBSD.org
Sat Jan 28 09:57:37 UTC 2017


On 28/01/2017 08:53, Victor Sudakov wrote:
> When poudriere has built some packages as dependencies, and I later on
> change the build options so that those dependencies are no longer
> needed, will poudriere automatically clean them up from
> $POUDRIERE_DATA/packages, or do I have to run "bulk -c" to start from
> scratch?

poudriere will not remove those no-longer required dependency packages
for an incremental bulk unless they or one of their own dependencies
should be updated -- ie. new version, change in options settings etc.

If you watch the poudriere output while it is building, it's not too
hard to follow what is going on.  This all happens fairly quickly at the
beginning where poudriere is working out what work it needs to do.
Basically poudriere takes a copy of the repo[*], deletes from it
everything that needs rebuilding (out of date, options changed, etc.)
and then removes everything that itsself depends on a removed package.
Then it takes the list of packages you give it which you want to have in
the repo, expands the list to include all of the dependencies those
packages require to both build and run and then generates all of the
packages that currently are missing from the repo.

This actually does do quite a bit more work than is strictly necessary
-- poudriere deliberately errs on the side of caution in order to ensure
that the generated repo is completely self consistent.

'poudriere bulk -c' just elides the step of working out what needs
updating and starts with an empty repository, so building every package
you need in order to produce the packages you want.

This also means that (if you choose the options in pkg.conf
appropriately) that you can keep older revisions of a pkg repo around,
which you can revert to if you need it.

	Cheers,

	Matthew

[*] Loosely "copy" in that it make links to the existing packages from
previous builds, so being rather more space efficient than literally
copying the packages every time.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20170128/b85491ff/attachment.sig>


More information about the freebsd-pkg mailing list