summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-14 01:56:45 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-10-14 01:56:45 +0000
commit228e9f101df598b634208de6e4b5690a8810f28b (patch)
tree6f35171ec5137e4cd9fb5bbe90974908f580c654 /urpm
parentf33357eec411ff5efba41219aba451ee30e5fefb (diff)
downloadurpmi-228e9f101df598b634208de6e4b5690a8810f28b.tar
urpmi-228e9f101df598b634208de6e4b5690a8810f28b.tar.gz
urpmi-228e9f101df598b634208de6e4b5690a8810f28b.tar.bz2
urpmi-228e9f101df598b634208de6e4b5690a8810f28b.tar.xz
urpmi-228e9f101df598b634208de6e4b5690a8810f28b.zip
Implement a new option, --norebuild, to urpmi, urpmi.update and urpmi.addmedia.
It prevents rebuilding the hdlist from the headers of the RPMs for a local media. It's also settable globally in the urpmi.cfg file. Comes with doc.
Diffstat (limited to 'urpm')
-rw-r--r--urpm/args.pm4
-rw-r--r--urpm/cfg.pm2
2 files changed, 5 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index afe63c66..b4eb6f2e 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -104,6 +104,7 @@ my %options_spec = (
$options{X} ||= $ENV{DISPLAY} && system('/usr/X11R6/bin/xtest', '') == 0
},
'verify-rpm!' => sub { $urpm->{options}{'verify-rpm'} = $_[1] },
+ 'norebuild!' => sub { $urpm->{options}{norebuild} = $_[1] },
'test!' => \$::test,
'skip=s' => \$options{skip},
'root=s' => \$::root,
@@ -248,6 +249,7 @@ my %options_spec = (
'noa|d' => \my $dummy, # default, keeped for compatibility
'q|quiet' => sub { --$options{verbose} },
'v|verbose' => sub { ++$options{verbose} },
+ 'norebuild!' => sub { $urpm->{options}{norebuild} = $_[1]; $options{force} = 0 },
'<>' => sub { push @::toupdates, $_[0] },
},
@@ -295,7 +297,7 @@ foreach my $k ("help|h", "version", "wget", "curl", "proxy=s", "proxy-user=s") {
}
foreach my $k ("help|h", "wget", "curl", "proxy=s", "proxy-user=s", "c", "f", "z",
- "limit-rate=s", "no-md5sum", "update")
+ "limit-rate=s", "no-md5sum", "update", "norebuild!")
{
$options_spec{'urpmi.addmedia'}{$k} = $options_spec{'urpmi.update'}{$k};
}
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index 3d5b123a..d6c48d6a 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -105,6 +105,7 @@ sub load_config ($) {
#- boolean options
if (($no, $k, $v) = /^(no-)?(
verify-rpm
+ |norebuild
|fuzzy
|allow-(?:force|nodeps)
|(?:pre|post)-clean
@@ -116,6 +117,7 @@ sub load_config ($) {
) {
my $yes = $no ? 0 : 1;
$no = $yes ? 0 : 1;
+ $v = '' unless defined $v;
$config{$medium}{$k} = $v =~ /^(yes|on|1|)$/i ? $yes : $no;
next;
}