From c50b27d11c426471a5b95a36da5c8eef8e027bac Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 22 Apr 2020 10:08:40 +0300 Subject: [PATCH] Don't check source package provides for dependencies Fixes a regression introduced by commit 75ec16e660e784d7897b37cac1a2b9b135825f25: the newly added provides of to-be-built packages end up being matched against installed packages during build dependency checking, such package satisfying its own build-requires and conflicts in installed packages. Explicitly skip checks against source provides, similarly to what we already did with obsoletes. Fixes: #1189 --- lib/depends.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/depends.c b/lib/depends.c index 6acb21dc3d..5794519267 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -1040,6 +1040,10 @@ int rpmtsCheck(rpmts ts) checkDS(ts, dcache, p, rpmteNEVRA(p), rpmteDS(p, RPMTAG_OBSOLETENAME), tscolor); + /* Skip obsoletion and provides checks for source packages (ie build) */ + if (rpmteIsSource(p)) + continue; + /* Check provides against conflicts in installed packages. */ while (rpmdsNext(provides) >= 0) { checkInstDeps(ts, dcache, p, RPMTAG_CONFLICTNAME, NULL, provides, 0); @@ -1047,10 +1051,6 @@ int rpmtsCheck(rpmts ts) checkInstDeps(ts, dcache, p, RPMTAG_REQUIRENAME, NULL, provides, 1); } - /* Skip obsoletion checks for source packages (ie build) */ - if (rpmteIsSource(p)) - continue; - /* Check package name (not provides!) against installed obsoletes */ checkInstDeps(ts, dcache, p, RPMTAG_OBSOLETENAME, NULL, rpmteDS(p, RPMTAG_NAME), 0);