summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
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;