[Pkg-cli-common-commits] [SCM] cli-common branch, master, updated. debian/0.8_xamarin1-3-g860d3f5

Julian Taylor jtaylor.debian at googlemail.com
Thu Sep 22 12:02:30 UTC 2011


The following commit has been merged in the master branch:
commit f22e4814d2c080d4ba3feec15f55102161b97f6a
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date:   Wed May 18 11:15:10 2011 +0200

    try to resolve all module references before failing

diff --git a/dh_clideps b/dh_clideps
index b378bf9..0fbb2ac 100755
--- a/dh_clideps
+++ b/dh_clideps
@@ -274,6 +274,7 @@ our $needs_net_1_0;
 our $needs_net_2_0;
 our $needs_net_2_1;
 our $needs_net_4_0;
+my $failure = 0;
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
   my $tmp = tmpdir($package);
@@ -314,6 +315,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
     verbose_print("Package: $package Assembly: $file");
         
     my %shlibRefs = resolveShlibRefs($package, $file);
+    if ($shlibRefs{failure} == 1) {
+        $failure = 1;
+    }
     push(@{$refs{depends}},    @{$shlibRefs{depends}});
     push(@{$refs{recommends}}, @{$shlibRefs{recommends}});
     push(@{$refs{suggests}},   @{$shlibRefs{suggests}});
@@ -385,6 +389,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
   addsubstvar($package, "cli:Suggests",   join(", ", @{$refs{suggests}}));
 }
 
+if ($failure != 0) {
+  error("Error: unresolvable module references or missing shlibs entries, please check above errors!");
+}
+
 sub filterDuplicates {
   my $package = shift;
   my $packages = shift;
@@ -606,7 +614,8 @@ sub resolveShlibRefs {
    my $config_filename = $assembly_filename.".config";
    my %ret = ( depends => [],
                recommends => [],
-               suggests => [] );
+               suggests => [],
+               failure => 0);
    if (-r $config_filename) {
      verbose_print("Found DLL map: $config_filename");
    } else {
@@ -680,7 +689,8 @@ sub resolveShlibRefs {
        verbose_print("Resolved moduleref to private library lib" . $name . ".so");
        next;
      } else {
-       error("Could not resolve moduleref: $name for: $assembly_filename!");
+       warning("Error: Could not resolve moduleref: $name for: $assembly_filename!");
+       $ret{failure} = 1;
        next;
      }
  
@@ -705,7 +715,8 @@ sub resolveShlibRefs {
            }
          }
          if (!defined($pkgref)) {
-           error("Missing shlibs entry: $target or $name for: $assembly_filename!");
+           warning("Error: Missing shlibs entry: $target or $name for: $assembly_filename!");
+           $ret{failure} = 1;
          }
        } else {
          verbose_print("Found private library $target for $name");

-- 
cli-common



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