summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-02-27 20:49:36 +0000
committerThierry Vignaud <tv@mageia.org>2012-02-27 20:49:36 +0000
commit72c315d0ff18010dd13c32a0b1b41d4a06f20686 (patch)
tree50292efc82e104acb184fb3365ec5621b5470b7b /urpmq
parent5e8cc5185a12d7d46034c10b214a97b5b9b96eee (diff)
downloadurpmi-72c315d0ff18010dd13c32a0b1b41d4a06f20686.tar
urpmi-72c315d0ff18010dd13c32a0b1b41d4a06f20686.tar.gz
urpmi-72c315d0ff18010dd13c32a0b1b41d4a06f20686.tar.bz2
urpmi-72c315d0ff18010dd13c32a0b1b41d4a06f20686.tar.xz
urpmi-72c315d0ff18010dd13c32a0b1b41d4a06f20686.zip
urpmq: fix non-zero exit code if .rpm file was not found (POK, mdv#64969)
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq15
1 files changed, 8 insertions, 7 deletions
diff --git a/urpmq b/urpmq
index 78f2142d..3a271526 100755
--- a/urpmq
+++ b/urpmq
@@ -160,7 +160,7 @@ if ($options{auto_orphans}) {
require urpm::orphans;
my $orphans = urpm::orphans::get_orphans($urpm);
print "$_\n" foreach sort map { $pkg_to_string->($_) } @$orphans;
- exit 0;
+ exit $urpm::postponed_code;
}
if ($options{env}) {
@@ -212,14 +212,14 @@ if ($options{list_aliases}) {
foreach (keys %{$urpm->{parallel_handler}{nodes} || {}}) {
print "$_\n";
}
- exit 0;
+ exit $urpm::postponed_code;
} elsif ($options{list_media} || $options{list_url}) {
foreach (@{$urpm->{media}}) {
next if $options{list_media} eq 'update' && !$_->{update};
next if $options{list_media} eq 'active' && $_->{ignore};
print $_->{name} . ($options{list_url} ? " $_->{url}" : "") . "\n";
}
- exit 0;
+ exit $urpm::postponed_code;
} elsif ($options{dump_config}) {
foreach (@{$urpm->{media}}) {
$_->{update} and print "--update ";
@@ -230,7 +230,7 @@ if ($options{list_aliases}) {
$_->{with_synthesis} and print "with " . escape_shell($_->{with_synthesis});
print "\n";
}
- exit 0;
+ exit $urpm::postponed_code;
} elsif ($options{list}) {
!@names && !@src_names or $urpm->{fatal}(1, N("use -l to list files"));
@@ -502,7 +502,7 @@ if ($options{list_aliases}) {
print "$_\n" foreach values %$local_sources;
print "$_\n" foreach map { urpm::blist_to_urls($_) } @$blists;
}
- exit 0;
+ exit $urpm::postponed_code;
} elsif ($options{summary}) {
foreach (keys %{$state->{selected}}) {
foreach (split /\|/, $_) {
@@ -510,7 +510,7 @@ if ($options{list_aliases}) {
printf "%s : %s ( %s%s-%s )\n", $pkg->name, $pkg->summary, ($pkg->epoch ? $pkg->epoch . ':' : ''), $pkg->version, $pkg->release;
}
}
- exit 0;
+ exit $urpm::postponed_code;
} elsif (my ($get) = grep { $options{$_} } 'provides', 'requires', 'conflicts', 'obsoletes', 'suggests') {
my @l = uniq_ { scalar $_->fullname } map { $urpm->{depslist}[$_] } map { split /\|/, $_ } keys %{$state->{selected}};
foreach my $pkg (@l) {
@@ -520,7 +520,7 @@ if ($options{list_aliases}) {
print "$_\n" foreach $pkg->$get;
}
}
- exit 0;
+ exit $urpm::postponed_code;
}
}
$urpmi_lock and $urpmi_lock->unlock;
@@ -562,3 +562,4 @@ foreach my $id (sort { eval { $urpm->{depslist}[$a]->name cmp $urpm->{depslist}[
}
}
+exit $urpm::postponed_code;