aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-12-04 11:36:12 +0000
committerThierry Vignaud <tv@mandriva.org>2006-12-04 11:36:12 +0000
commit0be605681b4a30af8762d59c1fc8932aad917df0 (patch)
treea7718705efa848b8fd6fa9b04e5d1629ef340d48
parent7be4f3ebabeff1310348840092bec57edc521e06 (diff)
downloadrpmdrake-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-xrpmdrake41
1 files 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..."));