CRUX

Welcome to CRUX bug tracking.
Tasklist

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
Task Type Improvement
Category tools → pkgutils
Status New
Assigned To CRUX Developers (crux)
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 10%
Votes 0
Private No

Details

Every 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

Comment by Fun (fun) - Sunday, 04 February 2018, 11:05 GMT Comment by Alan Mizrahi (alancio) - Monday, 25 March 2019, 18:33 GMT
I don't like it, it's too complicated.

Loading...