Deterministic package building with ports

Peter Schuller peter.schuller at infidyne.com
Wed Dec 3 14:19:05 PST 2008


> On the "donor" system:
> 1. portupgrade -a
> 2. for a in `pkg_info -ao | awk '{ print $1 }'` ; do pkg_create -b $a ; done
> 3. Push packages up to NFS'ed ports tree host's /usr/ports/packages
> 
> On the remaining systems, it's just a matter of running portupgrade -aPP.

Thanks! It helps to know what people are doing in practice.

The problem I have with this is the 'portupgrade -a'
step. portupgrade, in my experience, has sever issues with consistenty
relative to the actual ports tree in dependencies and figuring out
correctly what needs to be built and not. In addition, '-a' only
upgrades individual ports that have changed; not ports depending on
them.

You can do -arR instead or similar, but that does not help because the
process is not re-startable. I have not found out a way to make
portupgrade ensure that installed packages are what you would have
gotten had you installed your packages on a clean system from scratch.

This latter is what portmanager tries to do. While I like the idea for
in-place updating on a system, it has no supports for building
packages, and it too has its own set of issues with respect to
deciding what to upgrade and in what order.

portupgrade also does not support the concept of maintaining a list of
packages that you specifically want. This leads to problems over time
as dependency ports move around, disappear and have files moving
between them.

Both tools, portmanager and portupgrade, have always ended up, for me,
leading to a subset of broken packages that won't build or install for
various reasons - with said set growing larger over time.

The only method I have found which allows me to build and install
ports in a way which mostly works, assuming the port is not broken, is
to do "clean slate" installations.

However, just doing "for origin in $(cat somelist) ; do cd ... ; make
package-recusrive clean" and similar solutions have issues, including
non-restability and issues with recursion and duplicate work/package
creation. This is what I am trying to automate with my shell
hacks... which again *mostly* work, but not quite either.

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller at infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey at scode.org
E-Mail: peter.schuller at infidyne.com Web: http://www.scode.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20081203/9955fc3e/attachment.pgp


More information about the freebsd-ports mailing list