summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-27 20:52:11 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-27 20:52:11 +0000
commitf902492a01c974283c9c800ddbd5de651c474c25 (patch)
tree4a8eb59f4644fb18ef8e3a448c79061643b60145 /perl-install/pkgs.pm
parent73e7a0f1107be369f7304335082afac4f96ee3d2 (diff)
downloaddrakx-f902492a01c974283c9c800ddbd5de651c474c25.tar
drakx-f902492a01c974283c9c800ddbd5de651c474c25.tar.gz
drakx-f902492a01c974283c9c800ddbd5de651c474c25.tar.bz2
drakx-f902492a01c974283c9c800ddbd5de651c474c25.tar.xz
drakx-f902492a01c974283c9c800ddbd5de651c474c25.zip
no_comment
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm17
1 files changed, 10 insertions, 7 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index cc3dd166e..f9c5a462a 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -167,15 +167,13 @@ sub readCompss($) {
foreach (<$f>) {
/^\s*$/ || /^#/ and next;
s/#.*//;
- my ($options, $name) = /^(\S*)\s+(.*?)\s*$/ or log::l("bad line in compss: $_"), next;
- if ($name =~ /(.*):$/) {
+ if (/^(\S+)/) {
$ps = [];
- push @compss, { options => $options, name => $1, packages => $ps };
+ push @compss, { name => $1, packages => $ps };
} else {
- my $p = $packages->{$name} or log::l("unknown package $name (in compss)"), next;
- $p->{options} = $options;
- push @$ps, $p;
+ /(\S+)/ or log::l("bad line in compss: $_"), next;
+ push @$ps, $packages->{$1} || do { log::l("unknown package $1 (in compss)"); next };
}
}
\@compss;
@@ -302,7 +300,12 @@ sub install($$) {
$total += $p->{size};
}
- c::rpmdepOrder($trans) or c::rpmdbClose($db), c::rpmtransFree($trans), die "error ordering package list: ", c::rpmErrorString();
+ c::rpmdepOrder($trans) or
+ cdie "error ordering package list: " . c::rpmErrorString(),
+ sub {
+ c::rpmdbClose($db);
+ c::rpmtransFree($trans);
+ };
c::rpmtransSetScriptFd($trans, $fd);
eval { fs::mount("/proc", "$prefix/proc", "proc", 0) };