summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-12 12:05:22 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-12 12:05:22 +0000
commit665d9ad8aa8b8a71198ef8b6cae00e94b9244391 (patch)
treeb0dda9c2bb7e22f6922a67aacc1b201050142fba /perl-install/pkgs.pm
parentff64e6601b57962132cc0be8b7f8d70b86392ac0 (diff)
downloaddrakx-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar
drakx-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar.gz
drakx-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar.bz2
drakx-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.tar.xz
drakx-665d9ad8aa8b8a71198ef8b6cae00e94b9244391.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 22256af4e..340036fc9 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -23,12 +23,15 @@ sub skipThisPackage { member($_[0], @skipThesesPackages) }
sub Package {
my ($packages, $name) = @_;
- $packages->{$name} or die "unknown package $name";
+ $packages->{$name} ;# or die "unknown package $name"; hack hack :(
}
sub select($$;$) {
my ($packages, $p, $base) = @_;
$p->{selected} = -1; # selected by user
+ unless ($p->{deps}) {
+ 1;
+ }
my @l = @{$p->{deps}};
while (@l) {
my $n = shift @l;
@@ -107,6 +110,7 @@ sub psUsingDirectory(;$) {
log::l("scanning $dirname for packages");
foreach (all("$dirname")) {
my ($name, $version, $release) = /(.*)-([^-]+)-([^-.]+)\.[^.]+\.rpm/ or log::l("skipping $_"), next;
+
$packages{$name} = {
name => $name, version => $version, release => $release,
file => "$dirname/$_", selected => 0, deps => [],
@@ -125,7 +129,7 @@ sub getDeps($) {
$packages->{$name} or next;
$packages->{$name}->{size} = $size;
$packages->{$name}->{deps} = \@deps;
- map { push @{$packages->{$_}->{provides}}, $name } @deps;
+ map { push @{$packages->{$_}->{provides}}, $name if $packages->{$_} } @deps;
}
}