From fd659327e68d34233126711de86b709ffec9a2af Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 10 Dec 2007 08:57:41 +0000 Subject: fix writing no-suggests global option --- urpm/cfg.pm | 6 ++++-- 1 file 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') { $_; -- cgit v1.2.1