[Pkg-cli-common-commits] [SCM] cli-common branch, master, updated. debian/0.8_xamarin2-1-gd2c938c
Mirco Bauer
meebey at meebey.net
Sat Nov 26 03:55:06 UTC 2011
The following commit has been merged in the master branch:
commit d2c938cb1faec25125380caf3a198f5694d34e06
Author: Mirco Bauer <meebey at meebey.net>
Date: Sat Nov 26 04:45:08 2011 +0100
Fixed matching excluded modulerefs
The moduleref values were matched against the patterns instead of the other
way around. This broke when --exclude-moduleref=foobar was passed but the
assembly had a moduleref called foobar.dll, thus it wasn't matching!
The exclude pattern also has to use ^ and $ else it will also match libs that
start or end with completely different filenames.
Also renamed $name to $moduleref which probably lead to the confusion.
(thanks goes to Chow Loong Jin for his help to sort this out)
diff --git a/dh_clideps b/dh_clideps
index 2263b0a..6c938e5 100755
--- a/dh_clideps
+++ b/dh_clideps
@@ -114,22 +114,22 @@ a package dependency or failing if the libbaz dependency is unresolvable.
# Static list of modulerefs to automatically exclude
@{$dh{MODULE_EXCLUDE}} = (
- "i:advapi32.dll",
- "i:comctl32.dll",
- "i:dwmapi.dll",
- "i:gdi32.dll",
- "i:imm32.dll",
- "i:kernel32.dll",
- "i:netapi32.dll",
- "i:oleaut32.dll",
- "i:opengl32.dll",
- "i:shell32.dll",
- "i:shlwapi.dll",
- "i:system32.dll",
- "i:user32.dll",
- "i:uxtheme.dll",
- "i:winmm.dll",
- "i:ws2_32.dll",
+ "i:advapi32",
+ "i:comctl32",
+ "i:dwmapi",
+ "i:gdi32",
+ "i:imm32",
+ "i:kernel32",
+ "i:netapi32",
+ "i:oleaut32",
+ "i:opengl32",
+ "i:shell32",
+ "i:shlwapi",
+ "i:system32",
+ "i:user32",
+ "i:uxtheme",
+ "i:winmm",
+ "i:ws2_32",
);
# Add an item to the moduleref exclude list.
@@ -651,46 +651,47 @@ sub resolveShlibRefs {
local *F;
open(F, $tmpfile);
while (<F>) {
- my $name = $1 if /\d+:\s+(.*)\n/;
- if (!defined($name)) {
+ my $moduleref = $1 if /\d+:\s+(.*)\n/;
+ if (!defined($moduleref)) {
next;
}
my $skip = 0;
foreach my $excluded_moduleref (@{$dh{MODULE_EXCLUDE}}) {
# explicitly excluded modulerefs are never checked
$excluded_moduleref =~ /^(i:)?(.*)/;
- if (defined $1 && $1 eq "i:" && $2 =~ /$name(.dll)?/i) {
+ $exclude_pattern = "^$2(.dll)?\$";
+ if (defined $1 && $1 eq "i:" && $moduleref =~ /$exclude_pattern/i) {
# i: specified; case insensitive match
- verbose_print("Ignoring moduleref $name (case insensitive)");
+ verbose_print("Ignoring moduleref $moduleref (case insensitive)");
$skip = 1;
last;
- } elsif ($2 =~ /$name(.dll)?/) {
+ } elsif ($moduleref =~ /$exclude_pattern/) {
# case sensitive
- verbose_print("Ignoring moduleref $name");
+ verbose_print("Ignoring moduleref $moduleref");
$skip = 1;
last;
}
}
next if $skip;
- my $target = $dllmapdata{$name};
+ my $target = $dllmapdata{$moduleref};
my $fullTarget = $target;
if (defined($target)) {
$target = basename($target);
- verbose_print("Resolved moduleref via DLL map: $name to: $target");
+ verbose_print("Resolved moduleref via DLL map: $moduleref to: $target");
} elsif (defined($shlibdata{$name})) {
verbose_print("Resolved moduleref via direct match in shlibs");
- } elsif (resolvePrivateLibrary($package, $name, $package)) {
+ } elsif (resolvePrivateLibrary($package, $moduleref, $package)) {
# There is no DllMap, but the package ships the private library alongside the assembly
- verbose_print("Resolved moduleref to private library $name");
+ verbose_print("Resolved moduleref to private library $moduleref");
next;
- } elsif (resolvePrivateLibrary($package, "lib" . $name . ".so", $package)) {
+ } elsif (resolvePrivateLibrary($package, "lib" . $moduleref . ".so", $package)) {
# There is no DllMap, the assembly is relying on Mono's "foo" -> "libfoo.so"
# translation, and is shipping libfoo.so alongside the assembly
- verbose_print("Resolved moduleref to private library lib" . $name . ".so");
+ verbose_print("Resolved moduleref to private library lib" . $moduleref . ".so");
next;
} else {
- warning("Error: Could not resolve moduleref: $name for: $assembly_filename!");
+ warning("Error: Could not resolve moduleref: $moduleref for: $assembly_filename!");
$ret{failure} = 1;
next;
}
@@ -698,8 +699,8 @@ sub resolveShlibRefs {
my $pkgref;
if (defined($target) && defined($shlibdata{$target})) {
$pkgref = $shlibdata{$target};
- } elsif (defined($shlibdata{$name})) {
- $pkgref = $shlibdata{$name};
+ } elsif (defined($shlibdata{$moduleref})) {
+ $pkgref = $shlibdata{$moduleref};
} elsif (defined($target) && defined($shlibdata{$target.".0"})) {
# for DLL maps that have an unversioned library as target
$pkgref = $shlibdata{$target.".0"};
@@ -717,11 +718,11 @@ sub resolveShlibRefs {
}
}
if (!defined($pkgref)) {
- warning("Error: Missing shlibs entry: $target or $name for: $assembly_filename!");
+ warning("Error: Missing shlibs entry: $target or $moduleref for: $assembly_filename!");
$ret{failure} = 1;
}
} else {
- verbose_print("Found private library $target for $name");
+ verbose_print("Found private library $target for $moduleref");
next;
}
}
--
cli-common
More information about the Pkg-cli-common-commits
mailing list