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); diff --git a/lib/rpmal.c b/lib/rpmal.c index 3c8acd63a9..8a47d025a5 100644 --- a/lib/rpmal.c +++ b/lib/rpmal.c @@ -247,6 +247,10 @@ void rpmalAdd(rpmal al, rpmte p) rpmalNum pkgNum; availablePackage alp; + /* Source packages don't provide anything to depsolving */ + if (rpmteIsSource(p)) + return; + if (al->size == al->alloced) { al->alloced += al->delta; al->list = xrealloc(al->list, sizeof(*al->list) * al->alloced);