aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-01 16:58:32 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-01 16:58:32 +0000
commitabc3954f84a38fb4c85e7a035dd6ab56cb40b454 (patch)
tree37daf4ee018ab4346a5aa0ef0fd31e34e3cd6f67 /Rpmdrake
parent71196ac55480f2716868d25966a9fd34922747c4 (diff)
downloadrpmdrake-abc3954f84a38fb4c85e7a035dd6ab56cb40b454.tar
rpmdrake-abc3954f84a38fb4c85e7a035dd6ab56cb40b454.tar.gz
rpmdrake-abc3954f84a38fb4c85e7a035dd6ab56cb40b454.tar.bz2
rpmdrake-abc3954f84a38fb4c85e7a035dd6ab56cb40b454.tar.xz
rpmdrake-abc3954f84a38fb4c85e7a035dd6ab56cb40b454.zip
(open_db) rename as open_rpm_db() for consistency with open_urpmi_db()
Diffstat (limited to 'Rpmdrake')
-rw-r--r--Rpmdrake/gui.pm10
-rwxr-xr-xRpmdrake/pkg.pm14
-rwxr-xr-xRpmdrake/rpmnew.pm2
3 files changed, 13 insertions, 13 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index e1f20e42..62730102 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -428,7 +428,7 @@ sub closure_removal {
sub is_locale_available {
any { $urpm->{depslist}[$_]->flag_selected } keys %{$urpm->{provides}{$_[0]} || {}} and return 1;
my $found;
- open_db()->traverse_tag('name', [ $_ ], sub { $found ||= 1 });
+ open_rpm_db()->traverse_tag('name', [ $_ ], sub { $found ||= 1 });
return $found;
}
@@ -535,7 +535,7 @@ sub toggle_nodes {
$widget,
sub {
@requested = $urpm->resolve_requested(
- open_db(), $urpm->{state},
+ open_rpm_db(), $urpm->{state},
{ map { $pkgs->{$_}{pkg}->id => 1 } @nodes },
callback_choices => \&callback_choices,
);
@@ -546,7 +546,7 @@ sub toggle_nodes {
N("To satisfy dependencies, the following package(s) also need\nto be installed:\n\n"),
\@nodes, \@nodes_with_deps)) {
@nodes_with_deps = ();
- $urpm->disable_selected(open_db(), $urpm->{state}, @requested);
+ $urpm->disable_selected(open_rpm_db(), $urpm->{state}, @requested);
goto packages_selection_ok;
}
@@ -576,14 +576,14 @@ sub toggle_nodes {
} else {
my @unrequested;
slow_func($widget,
- sub { @unrequested = $urpm->disable_selected(open_db(), $urpm->{state},
+ sub { @unrequested = $urpm->disable_selected(open_rpm_db(), $urpm->{state},
map { $pkgs->{$_}{pkg} } @nodes) });
@nodes_with_deps = map { urpm_name($_) } @unrequested;
if (!deps_msg(N("Some packages need to be removed"),
N("Because of their dependencies, the following package(s) must be\nunselected now:\n\n"),
\@nodes, \@nodes_with_deps)) {
@nodes_with_deps = ();
- $urpm->resolve_requested(open_db(), $urpm->{state}, { map { $_->id => 1 } @unrequested });
+ $urpm->resolve_requested(open_rpm_db(), $urpm->{state}, { map { $_->id => 1 } @unrequested });
goto packages_unselection_ok;
}
packages_unselection_ok:
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index e53668b8..c7ce590e 100755
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -44,7 +44,7 @@ use urpm::select;
use Exporter;
our @ISA = qw(Exporter);
-our @EXPORT = qw(extract_header find_installed_version formatlistpkg get_pkgs open_db parse_compssUsers_flat perform_installation perform_removal run_rpm);
+our @EXPORT = qw(extract_header find_installed_version formatlistpkg get_pkgs open_rpm_db parse_compssUsers_flat perform_installation perform_removal run_rpm);
use mygtk2 qw(gtknew);
use ugtk2 qw(:all);
@@ -138,7 +138,7 @@ sub extract_header {
my %options;
# because rpm blocks some signals when rpm DB is opened, we don't keep open around:
-sub open_db {
+sub open_rpm_db {
my ($o_force) = @_;
my $host;
log::explanations("opening the RPM database");
@@ -163,7 +163,7 @@ sub open_db {
sub find_installed_version {
my ($p) = @_;
my @version;
- open_db()->traverse_tag('name', [ $p->name ], sub { push @version, $_[0]->version . '-' . $_[0]->release });
+ open_rpm_db()->traverse_tag('name', [ $p->name ], sub { push @version, $_[0]->version . '-' . $_[0]->release });
@version ? join(',', sort @version) : N("(none)");
}
@@ -308,7 +308,7 @@ sub get_pkgs {
my @base = ("basesystem", split /,\s*/, $urpm->{global_config}{'prohibit-remove'});
my (%base, %basepackages);
- my $db = open_db();
+ my $db = open_rpm_db();
my $sig_handler = sub { undef $db; exit 3 };
local $SIG{INT} = $sig_handler;
local $SIG{QUIT} = $sig_handler;
@@ -458,7 +458,7 @@ sub perform_parallel_install {
scroll => 1,
);
}
- open_db('force_sync');
+ open_rpm_db('force_sync');
$w->set_sensitive(1);
return 0;
}
@@ -493,7 +493,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my $state = $probe_only_for_updates ? { } : $urpm->{rpmdrake_state};
# select packages to install:
- $urpm->resolve_requested(open_db(), $state, { map { $_->id => undef } grep { $_->flag_selected } @{$urpm->{depslist}} },
+ $urpm->resolve_requested(open_rpm_db(), $state, { map { $_->id => undef } grep { $_->flag_selected } @{$urpm->{depslist}} },
callback_choices => \&Rpmdrake::gui::callback_choices);
my ($local_sources, $list) = urpm::get_pkgs::selected2list($urpm,
@@ -844,7 +844,7 @@ sub perform_removal {
@results = $::options{parallel}
? urpm::parallel::remove($urpm, \@toremove)
: urpm::install::install($urpm, \@toremove, {}, {});
- open_db('force_sync');
+ open_rpm_db('force_sync');
},
);
if (@results) {
diff --git a/Rpmdrake/rpmnew.pm b/Rpmdrake/rpmnew.pm
index 14e32aa7..10ff8627 100755
--- a/Rpmdrake/rpmnew.pm
+++ b/Rpmdrake/rpmnew.pm
@@ -181,7 +181,7 @@ sub do_merge_if_needed() {
my %pkg2rpmnew;
my $wait = wait_msg(N("Please wait, searching..."));
print "Searching .rpmnew and .rpmsave files...\n";
- Rpmdrake::pkg::open_db()->traverse(sub {
+ Rpmdrake::pkg::open_rpm_db()->traverse(sub {
my $n = my_fullname($_[0]);
$pkg2rpmnew{$n} = [ grep { m|^/etc| && (-r "$_.rpmnew" || -r "$_.rpmsave") } map { chomp_($_) } $_[0]->files ];
});