aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-09-18 17:57:07 +0000
committerThierry Vignaud <tv@mandriva.org>2006-09-18 17:57:07 +0000
commit336e4b45419d2f40b3e71e05ac3debf5e7607d25 (patch)
tree038e299806b92d8dc6e0c8d2ab89e22e59831ce1
parentc18ae6a69df289f570688c3404f486e11f583794 (diff)
downloadrpmdrake-336e4b45419d2f40b3e71e05ac3debf5e7607d25.tar
rpmdrake-336e4b45419d2f40b3e71e05ac3debf5e7607d25.tar.gz
rpmdrake-336e4b45419d2f40b3e71e05ac3debf5e7607d25.tar.bz2
rpmdrake-336e4b45419d2f40b3e71e05ac3debf5e7607d25.tar.xz
rpmdrake-336e4b45419d2f40b3e71e05ac3debf5e7607d25.zip
(run_rpm) make it behaves like `` regarding scalar/list contexts (fix
only listing first line of changelog/files list)
-rwxr-xr-xrpmdrake3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpmdrake b/rpmdrake
index 914eb545..48cf85a8 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -412,7 +412,8 @@ sub run_rpm {
foreach (qw(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)) {
local $ENV{$_} = $ENV{$_} . '.UTF-8' if !/UTF-8/;
}
- map { to_utf8($_) } `@_`
+ my @l = map { to_utf8($_) } `@_`;
+ wantarray() ? do { print "ARRAY\n" ; @l } : do { print "SCALAR\n"; join('', @l) };
}