summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--man/C/urpmi.cfg.54
-rw-r--r--urpm.pm10
-rw-r--r--urpm/cfg.pm1
3 files changed, 11 insertions, 4 deletions
diff --git a/man/C/urpmi.cfg.5 b/man/C/urpmi.cfg.5
index c96a1083..ee13cf85 100644
--- a/man/C/urpmi.cfg.5
+++ b/man/C/urpmi.cfg.5
@@ -64,6 +64,10 @@ speed, there is no limitation by default. The number is given in kilo-bytes per
second, unless a suffix \fBK\fP, \fBM\fP is added.
.TP
+.B nopubkey
+Don't import pubkeys when updating media.
+
+.TP
.B noreconfigure
Specifies that the media should not be reconfigured (by a reconfiguration file
present on the medium).
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.
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index 33ce8c2d..5baffc60 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -170,6 +170,7 @@ sub load_config ($;$) {
|keep
|auto
|strict-arch
+ |nopubkey
|resume)(?:\s*:\s*(.*))?$/x
) {
my $yes = $no ? 0 : 1;