summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-30 17:10:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-30 17:10:37 +0000
commit5ceea5e710015e7b58ccd4f8c00280ac13dc64d6 (patch)
treed12ce9f0831e03b7f0d6b60ffcdfc4e03b8411d7 /perl-install/pkgs.pm
parentcab2d5d83956892c3f5ce8f130e1245ffc7f6020 (diff)
downloaddrakx-backup-do-not-use-5ceea5e710015e7b58ccd4f8c00280ac13dc64d6.tar
drakx-backup-do-not-use-5ceea5e710015e7b58ccd4f8c00280ac13dc64d6.tar.gz
drakx-backup-do-not-use-5ceea5e710015e7b58ccd4f8c00280ac13dc64d6.tar.bz2
drakx-backup-do-not-use-5ceea5e710015e7b58ccd4f8c00280ac13dc64d6.tar.xz
drakx-backup-do-not-use-5ceea5e710015e7b58ccd4f8c00280ac13dc64d6.zip
(getDeps): ensure "depslist.ordered has not same package as hdlist files"
occurs when the hdlists are in fact not available
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 3ca58be51..20adaa468 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -510,6 +510,9 @@ sub getDeps {
#- beware of heavily mismatching depslist.ordered file against hdlist files.
my $mismatch = 0;
+ #- count the number of packages in deplist that are also in hdlist
+ my $nb_deplist = 0;
+
#- update dependencies list, provides attributes are updated later
#- cross reference to be resolved on id (think of loop requires)
#- provides should be updated after base flag has been set to save
@@ -526,14 +529,15 @@ sub getDeps {
#- silent warning for package which are unknown at this point.
$pkg or
log::l("ignoring $name-$version-$release.$arch in depslist is not in hdlist");
- $pkg && $version eq packageVersion($pkg) or
+ $pkg && $version ne packageVersion($pkg) and
log::l("ignoring $name-$version-$release.$arch in depslist mismatch version in hdlist"), $pkg = undef;
- $pkg && $release eq packageRelease($pkg) or
+ $pkg && $release ne packageRelease($pkg) and
log::l("ignoring $name-$version-$release.$arch in depslist mismatch release in hdlist"), $pkg = undef;
- $pkg && $arch eq packageArch($pkg) or
+ $pkg && $arch ne packageArch($pkg) and
log::l("ignoring $name-$version-$release.$arch in depslist mismatch arch in hdlist"), $pkg = undef;
if ($pkg) {
+ $nb_deplist++;
$epoch && $epoch > 0 and $pkg->[$EPOCH] = $epoch; #- only 5% of the distribution use epoch (serial).
$pkg->[$SIZE_DEPS] = $sizeDeps;
@@ -554,8 +558,8 @@ sub getDeps {
$mismatch and die "depslist.ordered mismatch against hdlist files";
#- check for same number of package in depslist and hdlists.
- scalar(keys %{$packages->{names}}) == scalar(@{$packages->{depslist}})
- or die "depslist.ordered has not same package as hdlist files";
+ my $nb_hdlist = keys %{$packages->{names}};
+ $nb_hdlist == $nb_deplist or die "depslist.ordered has not same package as hdlist files ($nb_deplist != $nb_hdlist)";
}
sub getProvides($) {