Welcome to CRUX bug tracking.
FS#1576 - pkgmk: flexible footprint check
Attached to Project:
CRUX
Opened by Fun (fun) - Friday, 02 February 2018, 11:10 GMT
Last edited by Predrag Ivanovic (pedja) - Monday, 18 March 2019, 15:01 GMT
Opened by Fun (fun) - Friday, 02 February 2018, 11:10 GMT
Last edited by Predrag Ivanovic (pedja) - Monday, 18 March 2019, 15:01 GMT
|
DetailsEvery port has a "hard" dependencies list ("Depends on" line, which is reflected in the .footprint file) and a "soft" dependencies list (partially found in the "Optional/Nice to have" line). Building the port while some soft dependency is installed may trigger a "footprint mismatch" error. The current workarounds for this case are: (1) set PKGMK_IGNORE_NEW, (2) force the installation with an explicit pkgadd or (3) make your own port. All have their disadvantages. (3) reduces the likelihood for a new user to become a "contrib" maintainer, (2) stops the "depinst" process and (1) reduces the utility of the .footprint file. I'll add here another workaround with its own disadvantages :)
Let's say some port has "/usr/bin/A" in its footprint when built without some soft dependency and "/usr/bin/A" plus "/usr/bin/B" when built with the soft dependency. The Pkgfile will be something like: pre_diff_footprint_filter() { cat; if [ -f /soft-depX ]; then echo "drwxr-xr-x root/root usr/bin/B"; fi; } build() { ...; if [ -f /soft-depX ]; then cflags+=--enable-x; fi; ./configure ... } The changes to pkgmk are minimal: replace the sort line from check_footprint() with: sort -k 3 $PKGMK_FOOTPRINT | pre_diff_footprint_filter > $FILE.footprint.orig and have a default "pre_diff_footprint_filter() {cat;}" |
This task depends upon
The pkgmk change: https://github.com/therealfun/crux-ports/blob/master/port-on-rails/enable-diff_footprint_filter
The port using this change: https://github.com/therealfun/crux-ports/blob/master/libvirt/Pkgfile