summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-07 02:37:47 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-09-07 02:37:47 +0000
commite2a592278c6518ed865f3f5c8aa73becae986330 (patch)
treeb47c15c4cd70b9f69964da886d848781ae3cdfbe /perl-install
parent4a2ca6b3c483bc930880f2b03be96f5d77e6d672 (diff)
downloaddrakx-e2a592278c6518ed865f3f5c8aa73becae986330.tar
drakx-e2a592278c6518ed865f3f5c8aa73becae986330.tar.gz
drakx-e2a592278c6518ed865f3f5c8aa73becae986330.tar.bz2
drakx-e2a592278c6518ed865f3f5c8aa73becae986330.tar.xz
drakx-e2a592278c6518ed865f3f5c8aa73becae986330.zip
Skip packages that are found on a supplementary media but that are
already provided by the main media.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm29
1 files changed, 27 insertions, 2 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c0105b055..f17c4cfd3 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -488,10 +488,35 @@ sub psUsingHdlist {
if ($m->{ignored}) {
log::l("ignoring packages in $hdlist");
} else {
+ our %uniq_pkg_seen;
if (-s $newsf) {
- ($m->{start}, $m->{end}) = $packages->parse_synthesis($newsf);
+ log::l("parse_synthesis");
+ ($m->{start}, $m->{end}) = $packages->parse_synthesis(
+ $newsf,
+ callback => sub {
+ my (undef, $p) = @_;
+ if ($uniq_pkg_seen{$p->fullname}++) {
+ log::l("skipping " . scalar $p->fullname);
+ return 0;
+ } else {
+ return 1;
+ }
+ },
+ );
} elsif (-s $newf) {
- ($m->{start}, $m->{end}) = $packages->parse_hdlist($newf, 1);
+ log::l("parse_hdlist");
+ ($m->{start}, $m->{end}) = $packages->parse_hdlist(
+ $newf,
+ callback => sub {
+ my (undef, $p) = @_;
+ if ($uniq_pkg_seen{$p->fullname}++) {
+ log::l("skipping " . scalar $p->fullname);
+ return 0;
+ } else {
+ return 1;
+ }
+ },
+ );
} else {
delete $packages->{mediums}{$medium_name};
unlink $newf;