summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-01 10:53:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-01 10:53:07 +0000
commite7680509b66f204cdb2e3925d333f07746dc4c36 (patch)
tree952b1c8d1e0fca5d9e7deaed288152d6ada4bc24 /urpm
parentd99173d6e61042d0ba9c4a6372c9e2a47d3bf942 (diff)
downloadurpmi-e7680509b66f204cdb2e3925d333f07746dc4c36.tar
urpmi-e7680509b66f204cdb2e3925d333f07746dc4c36.tar.gz
urpmi-e7680509b66f204cdb2e3925d333f07746dc4c36.tar.bz2
urpmi-e7680509b66f204cdb2e3925d333f07746dc4c36.tar.xz
urpmi-e7680509b66f204cdb2e3925d333f07746dc4c36.zip
create db_open_or_die_() and use it
Diffstat (limited to 'urpm')
-rw-r--r--urpm/install.pm4
-rw-r--r--urpm/select.pm6
2 files changed, 5 insertions, 5 deletions
diff --git a/urpm/install.pm b/urpm/install.pm
index a48fbf7c..bd45298e 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -43,7 +43,7 @@ sub build_transaction_set_ {
$db = new URPM;
$db->parse_synthesis($options{rpmdb});
} else {
- $db = urpm::db_open_or_die($urpm, $urpm->{root});
+ $db = urpm::db_open_or_die_($urpm);
}
my $sig_handler = sub { undef $db; exit 3 };
@@ -146,7 +146,7 @@ sub install {
my ($urpm, $remove, $install, $upgrade, %options) = @_;
$options{translate_message} = 1;
- my $db = urpm::db_open_or_die($urpm, $urpm->{root}, !$options{test}); #- open in read/write mode unless testing installation.
+ my $db = urpm::db_open_or_die_($urpm, !$options{test}); #- open in read/write mode unless testing installation.
my $trans = $db->create_transaction($urpm->{root});
if ($trans) {
diff --git a/urpm/select.pm b/urpm/select.pm
index f04d3bff..dc663d6f 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -248,7 +248,7 @@ sub resolve_dependencies {
$db = new URPM;
$db->parse_synthesis($options{rpmdb});
} else {
- $db = urpm::db_open_or_die($urpm, $urpm->{root});
+ $db = urpm::db_open_or_die_($urpm);
}
my $sig_handler = sub { undef $db; exit 3 };
@@ -285,7 +285,7 @@ sub resolve_dependencies {
sub select_replacepkgs {
my ($urpm, $state, $requested) = @_;
- my $db = urpm::db_open_or_die($urpm, $urpm->{root});
+ my $db = urpm::db_open_or_die_($urpm);
foreach my $id (keys %$requested) {
my @pkgs = $urpm->find_candidate_packages_($id);
if (my ($pkg) = grep { URPM::is_package_installed($db, $_) } @pkgs) {
@@ -387,7 +387,7 @@ sub find_packages_to_remove {
#- invoke parallel finder.
$urpm->{parallel_handler}->parallel_find_remove($urpm, $state, $l, %options, find_packages_to_remove => 1);
} else {
- my $db = urpm::db_open_or_die($urpm, $urpm->{root});
+ my $db = urpm::db_open_or_die_($urpm);
my (@m, @notfound);
if (!$options{matches}) {