[Pkg-cli-common-commits] [SCM] cli-common branch, master, updated. debian/0.8_exp1-5-g446fbd7

Iain Lane laney at ubuntu.com
Mon May 16 22:48:22 UTC 2011


The following commit has been merged in the master branch:
commit d7a98ab9710a065b2451931f0cc59b0a6938d11c
Author: Iain Lane <laney at ubuntu.com>
Date:   Thu May 5 23:40:25 2011 +0100

    Support case-insensitive excludes and search foo and foo.dll
    
    "i:" can be prefixed to --exclude-moduleref parameters now. This
    specifies a case insensitive match. It's common for applications to have
    User32 and user32 modulerefs, for example.
    
    Given a moduleref foo, .NET will load foo.dll. We should therefore
    search match excludes of foo.dll against modulerefs foo, to give
    consumers flexibility when specifying excludes.

diff --git a/dh_clideps b/dh_clideps
index 4475ae5..4f20728 100755
--- a/dh_clideps
+++ b/dh_clideps
@@ -78,6 +78,10 @@ of these ModuleRefs.  In particular, dh_clideps will not fail if these moduleref
 
 May be specified multiple times.  Each time it excludes a new ModuleRef.
 
+ModuleRefs to be excluded can be optionally prefixed with "i:" to specify a case-insensitive match.
+
+If foo is excluded, both foo and foo.dll will be considered when matching the exclude.
+
 =item B<internal-mono>                             
 
 Uses the mono runtime in . (used for bootstrapping mono packages)  
@@ -621,10 +625,23 @@ sub resolveShlibRefs {
      if (!defined($name)) {
        next;
      }
-     if ($name ~~ @{$dh{MODULE_EXCLUDE}}) {
-       # Ignore this moduleref as requested
-       next;
+     my $skip = 0;
+     foreach my $excluded_moduleref (@{$dh{MODULE_EXCLUDE}}) {
+       # explicitly excluded modulerefs are never checked
+       $excluded_moduleref =~ /^(i:)(.*)/;
+       if ($1 eq "i:" && $2 =~ /$name(.dll)?/i) {
+         # i: specified; case insensitive match
+         verbose_print("Ignoring moduleref $name (case insensitive)");
+         $skip = 1;
+         last;
+       } elsif ($2 =~ /$name(.dll)?/) {
+         # case sensitive
+         verbose_print("Ignoring moduleref $name");
+         $skip = 1;
+         last;
+       }
      }
+     next if $skip;
      my $target = $dllmapdata{$name};
      my $fullTarget = $target;
      

-- 
cli-common



More information about the Pkg-cli-common-commits mailing list