From 0be605681b4a30af8762d59c1fc8932aad917df0 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 4 Dec 2006 11:36:12 +0000 Subject: (get_pkgs) store medium name along with descriptions --- rpmdrake | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/rpmdrake b/rpmdrake index 295153eb..15f4d702 100755 --- a/rpmdrake +++ b/rpmdrake @@ -1563,26 +1563,27 @@ 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 { - my @pkg_list = split /\s+/, $1; - exists $cur->{importance} && $cur->{importance} !~ /^(?:security|bugfix)\z/ - and $cur->{importance} = 'normal'; - $update_descr{$_} = $cur foreach @{$cur->{pkgs} || []}; - $cur = {}; - $cur->{pkgs} = [ @pkg_list ]; - $section = 'pkg'; - next; - }; - /^%(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 }; - /^(ID|URL): +(.+)/ && $section eq 'pkg' - and do { $cur->{$1} = $2; next }; - $section =~ /^(pre|description)\z/ and $cur->{$1} .= $_; - } + foreach my $medium (@update_medias) { + foreach (cat_("$statedir/descriptions.$medium->{name}")) { + /^%package +(.+)/ and do { + my @pkg_list = split /\s+/, $1; + exists $cur->{importance} && $cur->{importance} !~ /^(?:security|bugfix)\z/ + and $cur->{importance} = 'normal'; + $update_descr{$_} = $cur foreach @{$cur->{pkgs} || []}; + $cur = { pkgs => \@pkg_list, medium => $medium->{name} }; + $section = 'pkg'; + next; + }; + /^%(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 }; + /^(ID|URL): +(.+)/ && $section eq 'pkg' + and do { $cur->{$1} = $2; next }; + $section =~ /^(pre|description)\z/ and $cur->{$1} .= $_; + } + } my $_unused = N("Please wait, finding available packages..."); my $wait = wait_msg_(N("Please wait, reading packages database...")); -- cgit v1.2.1