summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-29 16:16:22 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-29 16:16:22 +0000
commitbd523c4594e10c3532748c5c52482b481da6e7fc (patch)
tree25d9cd3832f65b95c731e80bad049369485bc624 /urpm.pm
parent2386d4d94e8987a2aed06e9a7ded50ca58d4a541 (diff)
downloadurpmi-bd523c4594e10c3532748c5c52482b481da6e7fc.tar
urpmi-bd523c4594e10c3532748c5c52482b481da6e7fc.tar.gz
urpmi-bd523c4594e10c3532748c5c52482b481da6e7fc.tar.bz2
urpmi-bd523c4594e10c3532748c5c52482b481da6e7fc.tar.xz
urpmi-bd523c4594e10c3532748c5c52482b481da6e7fc.zip
Add a "nopubkey" global option in urpmi.cfg
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index 3bfc720f..e7c62bc0 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -155,6 +155,7 @@ sub read_config {
verify-rpm
norebuild
strict-arch
+ nopubkey
)) {
if (defined $config->{''}{$opt} && !exists $urpm->{options}{$opt}) {
$urpm->{options}{$opt} = $config->{''}{$opt};
@@ -996,8 +997,9 @@ sub update_media {
$urpm->{media} or return; # verify that configuration has been read
+ my $nopubkey = $options{nopubkey} || $urpm->{options}{nopubkey};
#- get gpg-pubkey signature.
- if (!$options{nopubkey}) {
+ if (!$nopubkey) {
$urpm->exlock_rpm_db;
$urpm->{keys} or $urpm->parse_pubkeys(root => $urpm->{root});
}
@@ -1364,7 +1366,7 @@ this could happen if you mounted manually the directory when creating the medium
}
#- examine if a local pubkey file is available.
- if (!$options{nopubkey} && $medium->{hdlist} ne 'pubkey' && !$medium->{'key-ids'}) {
+ if (!$nopubkey && $medium->{hdlist} ne 'pubkey' && !$medium->{'key-ids'}) {
my $path_pubkey = reduce_pathname("$with_hdlist_dir/../" . _guess_pubkey_name($medium));
-e $path_pubkey or $path_pubkey = "$dir/pubkey";
if ($path_pubkey) {
@@ -1654,7 +1656,7 @@ this could happen if you mounted manually the directory when creating the medium
}
#- retrieve pubkey file.
- if (!$options{nopubkey} && $medium->{hdlist} ne 'pubkey' && !$medium->{'key-ids'}) {
+ if (!$nopubkey && $medium->{hdlist} ne 'pubkey' && !$medium->{'key-ids'}) {
my $local_pubkey = _guess_pubkey_name($medium);
foreach (reduce_pathname("$medium->{url}/$medium->{with_hdlist}/../$local_pubkey"),
reduce_pathname("$medium->{url}/pubkey"),
@@ -1992,7 +1994,7 @@ this could happen if you mounted manually the directory when creating the medium
}
$options{nolock} or $urpm->unlock_urpmi_db;
- $options{nopubkey} or $urpm->unlock_rpm_db;
+ $nopubkey or $urpm->unlock_rpm_db;
}
#- clean params and depslist computation zone.