aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-11-23 13:14:49 +0000
committerThierry Vignaud <tv@mandriva.org>2007-11-23 13:14:49 +0000
commit1b1a59805e4403ff23b472fd6cd2f1eeaf93a533 (patch)
treef299c3d6bf0db9ec9ab64f2580ca140da9e2dd76
parenta0c6f83eca40e8899dca8a938041d3e31dd24141 (diff)
downloadrpmdrake-1b1a59805e4403ff23b472fd6cd2f1eeaf93a533.tar
rpmdrake-1b1a59805e4403ff23b472fd6cd2f1eeaf93a533.tar.gz
rpmdrake-1b1a59805e4403ff23b472fd6cd2f1eeaf93a533.tar.bz2
rpmdrake-1b1a59805e4403ff23b472fd6cd2f1eeaf93a533.tar.xz
rpmdrake-1b1a59805e4403ff23b472fd6cd2f1eeaf93a533.zip
(open_db::open_urpmi_db) for consistency, move locking here from pkg::get_pkgs()
-rw-r--r--Rpmdrake/open_db.pm1
-rw-r--r--Rpmdrake/pkg.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index aa3cf9d6..80a28bad 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -89,6 +89,7 @@ sub open_urpmi_db() {
my $media = ref $::rpmdrake_options{media} ? join(',', @{$::rpmdrake_options{media}}) : '';
my $searchmedia = join(',', map { $_->{name} } grep { $_->{ignore} && $_->{name} =~ /backport/i } @{$urpm->{media}});
+ $urpm->{lock} = urpm::lock::urpmi_db($urpm, undef);
urpm::media::configure($urpm, media => $media, if_($searchmedia, searchmedia => $searchmedia));
$urpm;
}
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index bdee6b5b..6effac08 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -241,7 +241,7 @@ sub get_pkgs {
my $urpm = open_urpmi_db();
- my $_lock = urpm::lock::urpmi_db($urpm);
+ my $_drop_lock = before_leaving { undef $urpm->{lock} };
# update media list in case warn_about_media() added some:
@update_medias = get_update_medias($urpm);