summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-01-05 16:03:27 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-01-05 16:03:27 +0000
commitd30a3901fed225f9476a7bdd29d4ceeeede81fc9 (patch)
treee8824ea16023a0f3f7798cb7da81ab30f8df3b4a
parent2805fcb01e42a6d1400b3a895948f75ce1701cd2 (diff)
downloadurpmi-d30a3901fed225f9476a7bdd29d4ceeeede81fc9.tar
urpmi-d30a3901fed225f9476a7bdd29d4ceeeede81fc9.tar.gz
urpmi-d30a3901fed225f9476a7bdd29d4ceeeede81fc9.tar.bz2
urpmi-d30a3901fed225f9476a7bdd29d4ceeeede81fc9.tar.xz
urpmi-d30a3901fed225f9476a7bdd29d4ceeeede81fc9.zip
Fix urpmq -i with local RPMs
-rw-r--r--NEWS2
-rwxr-xr-xurpmq13
2 files changed, 10 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index e4db4a63..4756385c 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@
before restarting urpmi
- urpmi_rpm-find-leaves
o do not list suggested packages as unrequested packages (#46326)
+- urpmq
+ o fix urpmq -i on local RPMs
Version 6.19 - 24 November 2008
diff --git a/urpmq b/urpmq
index 1057c3ba..0d0b6ddd 100755
--- a/urpmq
+++ b/urpmq
@@ -442,12 +442,15 @@ if ($options{list_aliases}) {
$pkg->packager and printf "%-12s: %s\n", "Packager", $pkg->packager;
$pkg->url and printf "%-12s: %s\n", "URL", $pkg->url;
$pkg->summary and printf "%-12s: %s\n", "Summary", $pkg->summary;
- my $updesc = $updates_descr->{URPM::pkg2media($urpm->{media}, $pkg)->{name}}{$pkg->name};
- $pkg->description && !$updesc->{description}
- and printf "%-12s:\n%s\n", "Description", $pkg->description;
+
+ my $updesc = do {
+ my $media = URPM::pkg2media($urpm->{media}, $pkg);
+ $media && $updates_descr->{$media->{name}}{$pkg->name};
+ };
+ if (my $description = ($updesc && $updesc->{description}) || $pkg->description) {
+ printf "%-12s:\n%s\n", "Description", $description;
+ }
if ($updesc) {
- $updesc->{description}
- and printf "%-12s:\n%s\n", "Description", $updesc->{description};
$updesc->{updated}
and printf "%-20s: %s\n", "Last updated", $updesc->{updated};
$updesc->{importance}