diff options
author | Thierry Vignaud <tv@mandriva.org> | 2006-12-04 11:36:12 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2006-12-04 11:36:12 +0000 |
commit | 0be605681b4a30af8762d59c1fc8932aad917df0 (patch) | |
tree | a7718705efa848b8fd6fa9b04e5d1629ef340d48 | |
parent | 7be4f3ebabeff1310348840092bec57edc521e06 (diff) | |
download | rpmdrake-0be605681b4a30af8762d59c1fc8932aad917df0.tar rpmdrake-0be605681b4a30af8762d59c1fc8932aad917df0.tar.gz rpmdrake-0be605681b4a30af8762d59c1fc8932aad917df0.tar.bz2 rpmdrake-0be605681b4a30af8762d59c1fc8932aad917df0.tar.xz rpmdrake-0be605681b4a30af8762d59c1fc8932aad917df0.zip |
(get_pkgs) store medium name along with descriptions
-rwxr-xr-x | rpmdrake | 41 |
1 files changed, 21 insertions, 20 deletions
@@ -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...")); |