diff options
-rwxr-xr-x | rpmdrake | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -1197,20 +1197,22 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1); my ($cur, $section); #- parse the description file foreach (map { cat_("$statedir/descriptions.$_->{name}"), '%package dummy' } @update_medias) { - /^%package (.+)/ and do { - exists $cur->{importance} && !member($cur->{importance}, qw(security bugfix)) and $cur->{importance} = 'normal'; - $update_descr{$_} = $cur foreach @{$cur->{pkgs}}; + /^%package +(.+)/ and do { + my @pkg_list = split /\s+/, $1; + exists $cur->{importance} && $cur->{importance} !~ /^(?:security|bugfix)\z/ + and $cur->{importance} = 'normal'; + $descriptions{$_} = $cur foreach @{$cur->{pkgs} || []}; $cur = {}; - $cur->{pkgs} = [ split /\s/, $1 ]; + $cur->{pkgs} = [ @pkg_list ]; $section = 'pkg'; next; }; - /^Updated?: (.+)/ && $section eq 'pkg' and $cur->{update} = $1; - /^Importance: (.+)/ && $section eq 'pkg' and $cur->{importance} = $1; - /^%pre/ and do { $section = 'pre'; next }; - /^%description/ and do { $section = 'description'; next }; - $section eq 'pre' and $cur->{pre} .= $_; - $section eq 'description' and $cur->{description} .= $_; + /^%(pre|description)/ and do { $section = $1; next }; + /^Updated?: +(.+)/ && $section eq 'pkg' + and do { $cur->{update} = $1; next }; + /^Importance: +(.+)/ && $section eq 'pkg' + and do { $cur->{importance} = $1; next }; + $section =~ /^(pre|description)\z/ and $cur->{$1} .= $_; } } my $wait = wait_msg_(N("Please wait, finding available packages...")); |