Update of /cvsroot/fink/experimental/dmacks/scripts
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv3048

Modified Files:
        fink-package-precedence 
Log Message:
allow CLI prohibiting of specific bdep pkgs


Index: fink-package-precedence
===================================================================
RCS file: /cvsroot/fink/experimental/dmacks/scripts/fink-package-precedence,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fink-package-precedence     11 Feb 2010 08:35:46 -0000      1.2
+++ fink-package-precedence     11 Feb 2010 09:01:03 -0000      1.3
@@ -11,6 +11,7 @@
 
 my %opts = (
        'headers' => 1,                         # scan .h in -M dependency 
files?
+       'prohibit-bdep' => [],          # whine if .h supplied by these packages
        'libs' => 1,                            # scan otool -L of compiled 
binaries?
        'help' => 0,                            # print usage msg?
        );
@@ -18,6 +19,7 @@
 GetOptions(
        \%opts,
        'headers!',
+       'prohibit-bdep=s@',
        'libs!',
        'help|?',
        ) or $opts{'help'} = 1;
@@ -25,6 +27,15 @@
        # must specify at least one mode
        $opts{'help'} = 1;
 };
+if (@{$opts{'prohibit-bdep'}}) {
+       # handle comma-separated list like multiply-passed flag
+       $opts{'prohibit-bdep'} = [ split /,/, join ',', 
@{$opts{'prohibit-bdep'}} ];
+
+       if (!$opts{'headers'}) {
+               # can't disallow bdep based on header scan if not scanning 
headers
+               $opts{'help'} = 1;
+       }
+}
 if (!...@argv) {
        # must specify at least one location
        $opts{'help'} = 1;
@@ -43,6 +54,11 @@
                           * Fink packages that supply headers used
                             (packages to list in BuildDepends)
 
+  --prohibit-bdep=<pkg>   Test if --headers finds a .h that is supplied
+                          by installed fink package <pkg> (*2)
+                          (comma-separated list or multiple use of this
+                          flag is allowed)
+
   --libs/--no-libs        Scan compiled binaries for:
                           * System libraries that should be masked by
                             fink ones (*2)
@@ -156,6 +172,13 @@
 print "Found use of headers from ", scalar(keys %fink_pkgs), " fink 
packages:\n";
 map { print "\t$_\n" } sort keys %fink_pkgs;
 
+my @bad_bdep = grep { exists $fink_pkgs{$_} } @{$opts{'prohibit-bdep'}};
+if (@bad_bdep) {
+       print "Use of headers from prohibited installed packages:\n";
+       map { print "\t$_\n" } sort @bad_bdep;
+       die "Please fix build process to avoid seeing them.\n";
+}
+
 }
 
 if ($opts{'libs'}) {


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to