summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rpm-find-leaves2
-rw-r--r--urpm/media.pm2
-rwxr-xr-xurpme4
-rwxr-xr-xurpmf8
-rwxr-xr-xurpmq8
5 files changed, 12 insertions, 12 deletions
diff --git a/rpm-find-leaves b/rpm-find-leaves
index 1a419cbf..87aabdbb 100644
--- a/rpm-find-leaves
+++ b/rpm-find-leaves
@@ -23,7 +23,7 @@ where [options] are from
my $urpm = urpm->new;
-while ($_ = shift) {
+while (my $_ = shift) {
$_ eq '--root' and do {
my $root = shift;
$root and urpm::set_files($urpm, $root);
diff --git a/urpm/media.pm b/urpm/media.pm
index dfb3d4e8..6caf3b8a 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -646,7 +646,7 @@ sub configure {
}
}
if ($options{update}) {
- foreach (grep { !$_->{ignore} && ($_->{update}) } @{$urpm->{media} || []}) {
+ foreach (grep { !$_->{ignore} && $_->{update} } @{$urpm->{media} || []}) {
#- Ensure update media are selected
$_->{modified} = 1;
_tempignore($_, 0);
diff --git a/urpme b/urpme
index 95485e39..e7f4bb9e 100755
--- a/urpme
+++ b/urpme
@@ -163,10 +163,10 @@ if ($urpm->{options}{auto} || $env) {
$force || message_input_(P("Remove %d package?", "Remove %d packages?", scalar(@toremove), scalar(@toremove)) . N(" (y/N) "), boolean => 1) =~ /[$yesexpr]/ or exit 0;
}
-print $test ?
+print($test ?
#- Warning : the following message is parsed in urpm::parallel_*
N("testing removal of %s", join(' ', sort @toremove)) :
- N("removing %s", join(' ', sort @toremove)), "\n";
+ N("removing %s", join(' ', sort @toremove)), "\n");
exit 0 if $env;
diff --git a/urpmf b/urpmf
index a07a6066..b13b53f1 100755
--- a/urpmf
+++ b/urpmf
@@ -286,21 +286,21 @@ urpm::media::configure($urpm,
# nb: we don't "my" $medium since it is used for $callback
if ($needed_media_info{hdlist}) {
- foreach $medium (urpm::media::non_ignored_media($urpm)) {
+ foreach my $medium (urpm::media::non_ignored_media($urpm)) {
my $hdlist = urpm::media::any_hdlist($urpm, $medium, $options{verbose} < 0) or
$urpm->{error}(N("no hdlist available for medium \"%s\"", $medium->{name})), next;
$urpm->{log}("getting information from $hdlist");
$urpm->parse_hdlist($hdlist, callback => $callback);
}
} elsif (!@needed_xml_info) {
- foreach $medium (urpm::media::non_ignored_media($urpm)) {
+ foreach my $medium (urpm::media::non_ignored_media($urpm)) {
my $synthesis = urpm::media::any_synthesis($urpm, $medium) or
$urpm->{error}(N("no synthesis available for medium \"%s\"", $medium->{name})), next;
$urpm->{log}("getting information from $synthesis");
$urpm->parse_synthesis($synthesis, callback => $callback);
}
} elsif (my ($xml_info) = @needed_xml_info) {
- foreach $medium (urpm::media::non_ignored_media($urpm)) {
+ foreach my $medium (urpm::media::non_ignored_media($urpm)) {
my $xml_info_file = urpm::media::any_xml_info($urpm, $medium, $xml_info, $options{verbose} < 0);
if (!$xml_info_file) {
my $hdlist = urpm::media::any_hdlist($urpm, $medium, $options{verbose} < 0) or
@@ -340,7 +340,7 @@ if ($needed_media_info{hdlist}) {
EOF
$urpm->{debug} and $urpm->{debug}($code);
eval $code;
- $@ and $urpm->{fatal}(1, "$@");
+ $@ and $urpm->{fatal}(1, $@);
} else {
urpm::xml_info::do_something_with_nodes(
$xml_info,
diff --git a/urpmq b/urpmq
index bc6abe7e..c4dc42f6 100755
--- a/urpmq
+++ b/urpmq
@@ -416,12 +416,12 @@ if ($options{list_aliases}) {
} else {
my $pkgs_text = join(' ', map { $_->name } @pkgs);
if ($xml_info eq 'info') {
- $urpm->{info}((int(@pkgs) == 1) ?
+ $urpm->{info}(int(@pkgs) == 1 ?
N("no xml info for medium \"%s\", only partial result for package %s", $medium->{name}, $pkgs_text)
: N("no xml info for medium \"%s\", only partial result for packages %s", $medium->{name}, $pkgs_text));
} else {
- $urpm->{error}((int(@pkgs) == 1) ?
- N("no xml info for medium \"%s\", unable to return any result for package %s",$medium->{name}, $pkgs_text)
+ $urpm->{error}(int(@pkgs == 1) ?
+ N("no xml info for medium \"%s\", unable to return any result for package %s", $medium->{name}, $pkgs_text)
: N("no xml info for medium \"%s\", unable to return any result for packages %s", $medium->{name}, $pkgs_text));
}
}
@@ -463,7 +463,7 @@ if ($options{list_aliases}) {
my $media = URPM::pkg2media($urpm->{media}, $pkg);
$media && $updates_descr->{$media->{name}}{$pkg->name};
};
- if (my $description = ($updesc && $updesc->{description}) || $pkg->description) {
+ if (my $description = $updesc && $updesc->{description} || $pkg->description) {
printf "%-12s:\n%s\n", "Description", $description;
}
if ($updesc) {