Maintainable Non-Recursive poudriere-bulk(8) Guide
By default, poudriere uses a more cautious approach of recursively rebuilding packages to ensure installation stability from package repos like default for FreeBSD. However, there are some ports that genuinely don't need rebuilding because the recursive behavior also rebuilds blindly.
This guide is about using the non-recursive -S flag and mentioning about the reoccurring problems and strategies to overcome them.
This is targeted to users that build their local package repos for themselves only! And would not mind spending a bit of hands-on time in order to save even greater amounts of time compared to the default behavior.
Here are things to consider:
1. Some packages may fail to build due to missing pre-built dependencies.
Look through the error logs for lines that say "pkg-static: Missing dependency '<foopkg>'" for packages to manually rebuild through poudriere again.
The error log files for each failed package are conveniently located in /usr/local/poudriere/data/logs/bulk/<jail-name>-<portsdir-name>/<date-time-of-attempt>/logs/errors.
To save even more time, create a helper script that parses for these errors and outputs them as a string of category/pkg with spaces in between. Then use that output to feed back to poudriere-bulk(8) as a subshell command.
- Example:
1 poudriere bulk -S -j <jail-name> $(./missing_deps /path/to/applicable/errorlogs)
2. Use the following pkg-version(8) command in case the bulk '-S' flag did not detect any (additional) upgrades
1 pkg version -ol "<" | cut -d' ' -f1
As a prerequisite, edit /usr/local/etc/pkg.conf to change the value of PORTSDIR to point the ports directory that poudriere uses for this command to correctly do its update detection.
While this approach works well most of time, there are occasions where this process becomes problematic eventually.