summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-10 08:57:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-10 08:57:41 +0000
commitfd659327e68d34233126711de86b709ffec9a2af (patch)
tree33227a169567c2d622a0036bbb992dbe12367666 /urpm
parent78406dcbe64ba8c43d5d707f452c1a74fe4c5fe3 (diff)
downloadurpmi-fd659327e68d34233126711de86b709ffec9a2af.tar
urpmi-fd659327e68d34233126711de86b709ffec9a2af.tar.gz
urpmi-fd659327e68d34233126711de86b709ffec9a2af.tar.bz2
urpmi-fd659327e68d34233126711de86b709ffec9a2af.tar.xz
urpmi-fd659327e68d34233126711de86b709ffec9a2af.zip
fix writing no-suggests global option
Diffstat (limited to 'urpm')
-rw-r--r--urpm/cfg.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index f9019692..b3cd09a2 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -103,6 +103,8 @@ sub expand_line {
return $line;
}
+my $no_para_option_regexp = 'update|ignore|hdlist|synthesis|noreconfigure|no-suggests|static|virtual';
+
sub load_config_raw {
my ($file, $b_norewrite) = @_;
my @blocks;
@@ -159,7 +161,7 @@ sub load_config_raw {
$block->{$1} = $2;
} elsif (/^key[-_]ids\s*:\s*['"]?(.*?)['"]?$/) {
$block->{'key-ids'} = $1;
- } elsif (/^(update|ignore|hdlist|synthesis|noreconfigure|no-suggests|static|virtual)$/) {
+ } elsif (/^(hdlist|$no_para_option_regexp)$/) {
#- positive flags
$block->{$1} = 1;
} elsif (my ($no, $k, $v) =
@@ -225,7 +227,7 @@ sub dump_config_raw {
my @lines;
foreach my $m (@$blocks) {
my @l = map {
- if (/^(update|ignore|synthesis|noreconfigure|static|virtual)$/) {
+ if (/^($no_para_option_regexp)$/) {
$_;
} elsif ($_ eq 'hdlist' && $m->{$_} eq '1') {
$_;