summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-08-24 15:57:23 +0000
committerFrancois Pons <fpons@mandriva.com>2000-08-24 15:57:23 +0000
commit328ce33d9b48588abd507591d403ffcdf9612a93 (patch)
tree376572183d1ad3ac56718f5a21b08d721c7486f4 /perl-install/pkgs.pm
parentae6724e80a75c2e253daa9ded045c756f399e860 (diff)
downloaddrakx-backup-do-not-use-328ce33d9b48588abd507591d403ffcdf9612a93.tar
drakx-backup-do-not-use-328ce33d9b48588abd507591d403ffcdf9612a93.tar.gz
drakx-backup-do-not-use-328ce33d9b48588abd507591d403ffcdf9612a93.tar.bz2
drakx-backup-do-not-use-328ce33d9b48588abd507591d403ffcdf9612a93.tar.xz
drakx-backup-do-not-use-328ce33d9b48588abd507591d403ffcdf9612a93.zip
*** empty log message ***
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0b8339e5f..021d61657 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -171,7 +171,7 @@ sub extractHeaders($$$) {
cleanHeaders($prefix);
- run_program::run("extract_archive",
+ run_program::run("packdrake", "-x",
"/tmp/$medium->{hdlist}",
"$prefix/tmp/headers",
map { packageHeaderFile($_) } @$pkgs);
@@ -468,7 +468,7 @@ sub psUsingHdlist {
#- extract filename from archive, this take advantage of verifying
#- the archive too.
- open F, "extract_archive $newf |";
+ open F, "packdrake $newf |";
foreach (<F>) {
chomp;
/^[dlf]\s+/ or next;
@@ -754,7 +754,8 @@ sub init_db {
if ($isUpgrade) {
c::rpmdbRebuild($prefix) or die "rebuilding of rpm database failed: ", c::rpmErrorString();
}
- c::rpmdbInit($prefix, 0644) or die "creation of rpm database failed: ", c::rpmErrorString();
+ #- seems no more necessary to rpmdbInit ?
+ #c::rpmdbOpen($prefix) or die "creation of rpm database failed: ", c::rpmErrorString();
}
sub done_db {
@@ -1116,10 +1117,11 @@ sub install($$$;$$) {
} else {
#- child process will run each transaction.
$SIG{SEGV} = sub { log::l("segmentation fault on transactions"); c::_exit(0) };
+ my $db;
eval {
close INPUT;
select((select(OUTPUT), $| = 1)[0]);
- my $db = c::rpmdbOpen($prefix) or die "error opening RPM database: ", c::rpmErrorString();
+ $db = c::rpmdbOpen($prefix) or die "error opening RPM database: ", c::rpmErrorString();
my $trans = c::rpmtransCreateSet($db, $prefix);
log::l("opened rpm database for transaction of ". scalar @transToInstall ." new packages, still $nb after that to do");
@@ -1151,10 +1153,11 @@ sub install($$$;$$) {
c::rpmdbClose($db);
die "installation of rpms failed:\n ", join("\n ", @probs);
}
- c::rpmdbClose($db);
- log::l("rpm database closed");
}; $@ and print OUTPUT "die:$@\n";
+ c::rpmdbClose($db);
+ log::l("rpm database closed");
+
close OUTPUT;
c::_exit(0);
}