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

Christopher James Halse Rogers raof at ubuntu.com
Sat Apr 9 12:31:25 UTC 2011

The following commit has been merged in the master branch:
commit c505418fd69d50706033af47a40a2d0712f84407
Author: Christopher James Halse Rogers <raof at ubuntu.com>
Date:   Wed Apr 6 22:41:55 2011 +1000

    Add --exclude-moduleref option to dh_clideps

diff --git a/dh_clideps b/dh_clideps
index 0d06eaf..b43d0b1 100755
--- a/dh_clideps
+++ b/dh_clideps
@@ -71,6 +71,13 @@ Paths to exclude from the .dll/.exe search.  Assemblies in these paths or their
 will not be searched for dependencies, and assemblies missing references will not cause dh_clideps 
 to fail.
+=item B<--exclude-modulref=>moduleref
+ModuleRef to exclude from dependency resolution.  dh_clideps will not attempt to resolve dependencies
+of these ModuleRefs.  In particular, dh_clideps will not fail if these modulerefs are unresolvable.
+May be specified multiple times.  Each time it exculdes a new ModuleRef.
 =item B<internal-mono>                             
 Uses the mono runtime in . (used for bootstrapping mono packages)  
@@ -94,14 +101,25 @@ Suppose your source package libquux1.0-cil also ships some examples in /usr/shar
 want to pull in those dependencies.
   dh_clideps -X/usr/share
+Suppose your source package has a ModuleRef on libbaz but works correctly
+without it.  Excluding this ModuleRef will prevent dh_clideps from adding
+a package dependency or failing if the libbaz dependency is unresolvable.
+  dh_clideps --exclude-moduleref=libbaz
+# Add an item to the moduleref exclude list.
+sub AddModulerefExclude { my($option,$value)=@_;
+	push @{$dh{MODULE_EXCLUDE}},$value;
 # gar, debhelper 7.1 defines -d for all scripts already :(
 init(options => {
 #  "d" => \$dh{D_FLAG},
   "r" => \$dh{R_FLAG},
   "l=s", => \$dh{L_PARAMS},
   "internal-mono"  => \$dh{INTERNAL_MONO_FLAG},
+  "exclude-moduleref=s", => \&AddModulerefExclude,
 my $clr;
@@ -603,6 +621,10 @@ sub resolveShlibRefs {
      if (!defined($name)) {
+     if ($name ~~ @{$dh{MODULE_EXCLUDE}}) {
+       # Ignore this moduleref as requested
+       next;
+     }
      my $target = $dllmapdata{$name};
      my $fullTarget = $target;


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