summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-27 12:29:30 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-27 12:29:30 +0000
commit60f00ed59887cd32d5cd7252de138bca359e67b7 (patch)
tree1d6543b22db541c87d9acaca4b08a1284d323546
parent13b713dc4315f11f9408f7c1995b1fd03a75c008 (diff)
downloadurpmi-60f00ed59887cd32d5cd7252de138bca359e67b7.tar
urpmi-60f00ed59887cd32d5cd7252de138bca359e67b7.tar.gz
urpmi-60f00ed59887cd32d5cd7252de138bca359e67b7.tar.bz2
urpmi-60f00ed59887cd32d5cd7252de138bca359e67b7.tar.xz
urpmi-60f00ed59887cd32d5cd7252de138bca359e67b7.zip
Don't let urpmq lock the urpmi db if it only dumps the configuration
-rwxr-xr-xurpmq5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpmq b/urpmq
index b2ba9369..eb9aa92d 100755
--- a/urpmq
+++ b/urpmq
@@ -111,6 +111,7 @@ $urpm::args::options{nodepslist} = $urpm::args::options{list_aliases}
|| $urpm::args::options{list_media}
|| $urpm::args::options{dump_config}
|| $urpm::args::options{list_url};
+$urpm::args::options{nolock} = 1 if $urpm::args::options{nodepslist};
if ($urpm::args::options{env}) {
print STDERR N("using specific environment on %s\n", $urpm::args::options{env});
@@ -123,7 +124,7 @@ if ($urpm::args::options{env}) {
$urpm::args::options{upgrade} && !$urpm::args::options{env} && !$urpm::args::options{nolock}
and $urpm->shlock_rpm_db;
-$urpm->shlock_urpmi_db;
+$urpm::args::options{nolock} or $urpm->shlock_urpmi_db;
$urpm->configure(
nocheck_access => 1,
noskipping => $urpm::args::options{nodepslist},
@@ -437,7 +438,7 @@ if ($urpm::args::options{list_aliases}) {
exit 0;
}
}
-$urpm->unlock_urpmi_db;
+$urpm::args::options{nolock} or $urpm->unlock_urpmi_db;
$urpm::args::options{upgrade} && !$urpm::args::options{env} && !$urpm::args::options{nolock}
and $urpm->unlock_rpm_db;