Suggested patch: Selectively exempt files from rev-upgrade

Clemens Lang cal at macports.org
Wed Jan 11 08:32:39 PST 2012


There's been a request for a way to tell rev-upgrade to ignore a file it
would mark as broken, but in fact is not.

I've written a patch against base (r88777), which should implement this,
but I'd like to ask for a review before commiting this into base.

The patch adds a new database column[1] in the files table, which can be
set to 1 causing rev-upgrade to ignore the file. Since the exception
list has to be specified on a port-by-port base I added a new Portfile
option called precompiled (I didn't name it after rev-upgrade, because
the other GSoC project doing sanity checks should probably use this,
too) which takes glob patterns (multiple can be separated by whitespace)
and sets the bit on each file installed by that port that matches any of
the patterns.
The pattern is evaluated using fnmatch(3) in cregistry/entry.c using the
flag FNM_LEADING_DIR.

e.g.:
precompiled $prefix/lib $prefix/bin/foobar

Would set the precompiled bit on all files installed into lib and the
file bin/foobar.

Patch is attached.

[1] Other than I had expected the database version isn't compared using
float semantics, which means any new datbase version must be >= 1.101.
-- 
Clemens Lang
GSoC Student

-------------- next part --------------
A non-text attachment was scrubbed...
Name: precompiled-pattern-ignore.patch
Type: text/x-diff
Size: 11364 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120111/72bbcdde/attachment.bin>


More information about the macports-dev mailing list