aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Rpmdrake/gui.pm10
-rwxr-xr-xRpmdrake/pkg.pm14
-rwxr-xr-xRpmdrake/rpmnew.pm2
-rwxr-xr-xrpmdrake6
4 files changed, 16 insertions, 16 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 ];
});
diff --git a/rpmdrake b/rpmdrake
index 738ba991..91b0330f 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -68,7 +68,7 @@ sub do_search($$$$$$$) {
N("Please wait, searching..."),
$w->{real_window},
sub {
- open_db()->traverse(sub {
+ open_rpm_db()->traverse(sub {
push @search_results, map { if_($_ =~ $entry_rx, urpm_name($_[0])) } $_[0]->files;
});
@search_results = grep { exists $pkgs->{$_} } uniq(@search_results);
@@ -359,7 +359,7 @@ sub run_treeview_dialog {
[ N("/_File") . N("/_Reset the selection"), undef, sub {
if ($MODE ne 'remove') {
$urpm->disable_selected(
- open_db(), $urpm->{state},
+ open_rpm_db(), $urpm->{state},
map { if_($pkgs->{$_}{selected}, $pkgs->{$_}{pkg}) } keys %$pkgs,
);
}
@@ -529,7 +529,7 @@ readconf();
warn_about_user_mode();
-open_db();
+open_rpm_db();
do_merge_if_needed();