aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-07 16:12:01 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-08 11:44:02 +0200
commitc3c6ac847a9cd3a4b87cfc645570b998daf64fb2 (patch)
tree06460f9078421f5152fe87bb9a22171010d46245
parentc17a6f33d25213a40a7c1bcad3302fd84de175b7 (diff)
downloadperl-URPM-c3c6ac847a9cd3a4b87cfc645570b998daf64fb2.tar
perl-URPM-c3c6ac847a9cd3a4b87cfc645570b998daf64fb2.tar.gz
perl-URPM-c3c6ac847a9cd3a4b87cfc645570b998daf64fb2.tar.bz2
perl-URPM-c3c6ac847a9cd3a4b87cfc645570b998daf64fb2.tar.xz
perl-URPM-c3c6ac847a9cd3a4b87cfc645570b998daf64fb2.zip
workaround rpm-4.16 adding provides to SRPMs
rationale: rpm-4.16 adds provides for all generated RPMS to SRPMs, which breaks urpmi's testsuite (t/superuser--srpm-bootstrapping.t) See rpm's commit 75ec16e660e784d7897b37cac1a2b9b135825f25
-rw-r--r--NEWS1
-rw-r--r--URPM/Resolve.pm3
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index b6b72ab..b93971b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- add support for reinstall (needs rpm >= 4.12.x)
+- workaround rpm-4.16 adding provides to SRPMs, thus fixing urpmi testuite
Version 5.24.1 - 17 January 2020
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 33504b5..c799dff 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -641,11 +641,12 @@ sub unsatisfied_requires {
#- check on the selected package if a provide is satisfying the resolution (need to do the ops).
foreach (grep { exists $state->{selected}{$_} } keys %{$urpm->{provides}{$n} || {}}) {
my $p = $urpm->{depslist}[$_];
+ next if $p->arch eq 'src'; # ignore provides from SRPM (new in rpm-4.16)
!$urpm->{provides}{$n}{$_} || $p->provides_overlap($prop) and next REQUIRES;
}
#- check if the package itself provides what is necessary.
- $pkg->provides_overlap($prop) and next REQUIRES;
+ $pkg->arch ne 'src' and $pkg->provides_overlap($prop) and next REQUIRES;
#- check on installed system if a package which is not obsoleted is satisfying the require.
my $satisfied = 0;