diff options
-rwxr-xr-x | urpmf | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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), "}", |