diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-22 16:38:44 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-22 16:38:44 +0000 |
commit | b4813a6eca535efa65067be3697af854f0ee8f79 (patch) | |
tree | 3398b65545d63f9e470d2826966f8ceb8477390a /perl-install | |
parent | 53b5abee1210a87a0004573a9dd7d7e3dfbe05ea (diff) | |
download | drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar.gz drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar.bz2 drakx-b4813a6eca535efa65067be3697af854f0ee8f79.tar.xz drakx-b4813a6eca535efa65067be3697af854f0ee8f79.zip |
(read_rpmsrate): if $packages is undef, ignore it. That way, read_rpmsrate
can be called standalone.
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/pkgs.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index a8446990f..861cac35f 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -637,9 +637,12 @@ sub read_rpmsrate { # has packages on same line my ($rate) = grep { /^\d$/ } @m or die sprintf qq(missing rate for "%s" at line %d (flags are %s)\n), $data, $line_nb, join('&&', @m); foreach (split ' ', $data) { - #-log::l("rpmsrate: $_ = ", join(" && ", @m)); - my $p = packageByName($packages, $_) or log::l("unknown package $_"), next; - $p->[$VALUES] = join("\t", $rate, grep { !/^\d$/ } @m); + if ($packages) { + my $p = packageByName($packages, $_) or next; + $p->[$VALUES] = join("\t", $rate, grep { !/^\d$/ } @m); + } else { + print "$_ = ", join(" && ", @m), "\n"; + } } push @l, @l2; } else { |