[SCM] Debian Qt/KDE packaging tools branch, dhmk, updated. debian/0.9.5-25-g3e6398a

Modestas Vainius modax at alioth.debian.org
Wed Mar 9 12:06:16 UTC 2011


The following commit has been merged in the dhmk branch:
commit 6366efa1f1f24fbb100222c40dc1b06f782db67b
Author: Modestas Vainius <modestas at vainius.eu>
Date:   Wed Mar 9 02:11:52 2011 +0200

    Simplify passing of extra options to non-overriden commands.
    
    Options are passed via DHMK_OPTIONS envvar which has to be set to overrides to
    work anyway. What is more, DHMK_OPTIONS is derefenced in dhmk.mk rather than
    being expanded in dhmk.pl directly.
---
 qt-kde-team/2/dhmk.mk |    2 +-
 qt-kde-team/2/dhmk.pl |   13 ++++---------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/qt-kde-team/2/dhmk.mk b/qt-kde-team/2/dhmk.mk
index 7b60c7c..5f496e4 100644
--- a/qt-kde-team/2/dhmk.mk
+++ b/qt-kde-team/2/dhmk.mk
@@ -55,7 +55,7 @@ include $(shell test ! -f $(dhmk_rules_mk) && touch -t 197001030000 $(dhmk_rules
 
 # Routine to run a specific command ($1 should be {target}_{command})
 dhmk_override_cmd = $(if $(dhmk_$1),$(MAKE) -f $(dhmk_top_makefile) $1)
-dhmk_run_command = $(or $(call dhmk_override_cmd,override_$(call butfirstword,$1,_)),$($1))
+dhmk_run_command = $(or $(call dhmk_override_cmd,override_$(call butfirstword,$1,_)),$($1) $(DHMK_OPTIONS))
 
 # Generate dhmk_{pre,post}_{target}_{command} targets for each target+command
 $(foreach t,$(dhmk_standard_targets),$(foreach c,$(dhmk_$(t)_commands),dhmk_pre_$(t)_$(c))): dhmk_pre_%:
diff --git a/qt-kde-team/2/dhmk.pl b/qt-kde-team/2/dhmk.pl
index f96bfa1..b84a552 100755
--- a/qt-kde-team/2/dhmk.pl
+++ b/qt-kde-team/2/dhmk.pl
@@ -149,8 +149,8 @@ sub load_addons {
     return 1;
 }
 
-# Add extra options to each command
-sub add_extraopts {
+# Generate extra options from command line options
+sub gen_extraopts {
     my @opts;
     # Convert "--option value" syntax to --option=value like dh(1) would do
     foreach my $opt (@_) {
@@ -162,12 +162,7 @@ sub add_extraopts {
             push @opts, $opt;
         }
     }
-    my $shescaped =" " . join(" ", map({ s/^'-/-O'-/; $_ } _escape_shell(@opts)));
-    _find_cmd_and_do(sub {
-        my ($cmds, $i) = ($_[0], ${$_[1]});
-        $cmds->[$i] .= $shescaped;
-    });
-    return $shescaped;
+    return join(" ", map({ s/^'-/-O'-/; $_ } _escape_shell(@opts)));
 }
 
 1;
@@ -380,7 +375,7 @@ eval {
         }
     }
     if (@{$cmdopts{extraopts}}) {
-        $shextraopts = Debian::PkgKde::Dhmk::DhCompat::add_extraopts(@{$cmdopts{extraopts}});
+        $shextraopts = Debian::PkgKde::Dhmk::DhCompat::gen_extraopts(@{$cmdopts{extraopts}});
     }
     my $overrides = get_override_info($RULES_FILE, get_commands($targets));
     write_dhmk_rules($DHMK_RULES_FILE, $RULES_FILE, $targets, $overrides, $shextraopts);

-- 
Debian Qt/KDE packaging tools



More information about the pkg-kde-commits mailing list