summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-07 08:51:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-07 08:51:46 +0000
commit23b75ec646306127dd7a9695507010c872c63a57 (patch)
treee895b2c69896776e0ce5cb345c0699d3aed993fe
parentcead340ceb424e9134f14577af382d696f843168 (diff)
downloadurpmi-23b75ec646306127dd7a9695507010c872c63a57.tar
urpmi-23b75ec646306127dd7a9695507010c872c63a57.tar.gz
urpmi-23b75ec646306127dd7a9695507010c872c63a57.tar.bz2
urpmi-23b75ec646306127dd7a9695507010c872c63a57.tar.xz
urpmi-23b75ec646306127dd7a9695507010c872c63a57.zip
small fix: there may be no medium name for a package (from command line)
-rwxr-xr-xurpmi3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpmi b/urpmi
index af749e8c..03e96541 100755
--- a/urpmi
+++ b/urpmi
@@ -585,7 +585,8 @@ foreach my $pkg (sort { $a->name cmp $b->name } @{$urpm->{depslist}}[keys %{$sta
if (!$env && $install_src && $pkg->arch ne 'src') {
push @root_only, $pkg->fullname;
} elsif ($install_src || $pkg->arch ne 'src') {
- my @name_and_evr = ($pkg->fullname, URPM::pkg2media($urpm->{media}, $pkg)->{name});
+ my $medium = URPM::pkg2media($urpm->{media}, $pkg);
+ my @name_and_evr = ($pkg->fullname, $medium && $medium->{name});
$name_and_evr[2] =~ s/mdv(.*)/mdv/ if length($name_and_evr[2]) > 15;
if ($state->{selected}{$pkg->id}{suggested}) {
push @name_and_evr, N("(suggested)");