diff options
-rw-r--r-- | perl-install/install_any.pm | 2 | ||||
-rw-r--r-- | perl-install/pkgs.pm | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 545215f1a..fde155b26 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -1016,7 +1016,7 @@ sub install_urpmi { delete $packages->{rpmdb}; #- import pubkey in rpmdb. - my $db = pkgs::rpmDbOpenForInstall(); + my $db = pkgs::open_rpm_db_rw(); $packages->parse_pubkeys(db => $db); foreach my $medium (@mediums) { $packages->import_needed_pubkeys($medium->{pubkey}, db => $db, callback => sub { diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index cf56128c8..121e421c8 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -899,7 +899,7 @@ sub rpmDbCleanLogs() { unlink glob("$::prefix/var/lib/rpm/__db.*"); } -sub rpmDbOpenForInstall() { +sub open_rpm_db_rw() { my $db = URPM::DB::open($::prefix, 1); $db and log::l("opened rpmdb for writing in $::prefix"); $db; @@ -1126,7 +1126,7 @@ sub install { $close->($_); } } else { - my $db = rpmDbOpenForInstall() or die "error opening RPM database: ", URPM::rpmErrorString(); + my $db = open_rpm_db_rw() or die "error opening RPM database: ", URPM::rpmErrorString(); my $trans = $db->create_transaction($::prefix); if ($retry_pkg) { log::l("opened rpm database for retry transaction of 1 package only"); @@ -1250,7 +1250,7 @@ sub remove_raw { log::l("removing: " . join(' ', @$to_remove)); - my $db = rpmDbOpenForInstall() or die "error opening RPM database: ", URPM::rpmErrorString(); + my $db = open_rpm_db_rw() or die "error opening RPM database: ", URPM::rpmErrorString(); my $trans = $db->create_transaction($::prefix); #- stuff remove all packages that matches $p, not a problem since $p has name-version-release format. |