summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xurpmf9
1 files changed, 8 insertions, 1 deletions
diff --git a/urpmf b/urpmf
index 8ef91697..4dbbeb54 100755
--- a/urpmf
+++ b/urpmf
@@ -132,12 +132,18 @@ my $sprintfargs = join(', ', map {
} elsif ($multitags{$_}) {
$multitag and $urpm->{fatal}->(1, N("Incorrect format: you may use only one multi-valued tag"));
$multitag = $_;
- '$mt';
+ "'%s'";
} else {
'$pkg->' . $_;
}
} $qf =~ /%[-\d]*(\w+)/g);
+my ($proto_cooked, $sprintfargs_cooked);
+if ($multitag) {
+ ($proto_cooked, $sprintfargs_cooked) = ($proto, $sprintfargs);
+ ($proto, $sprintfargs) = ('$proto_cooked', '$mt');
+}
+
my $next_st = $multitag ? 'next' : 'return 1';
my @inner = (
"my \$s = sprintf(qq{$proto}, $sprintfargs);",
@@ -148,6 +154,7 @@ my @inner = (
if ($multitag) {
@inner = (
+ "my \$proto_cooked = sprintf(qq{$proto_cooked}, $sprintfargs_cooked);",
"foreach my \$mt (\$pkg->$multitag) {",
(map { " $_" } @inner),
"}",