Skip to content

Commit

Permalink
Don't check source package provides for dependencies
Browse files Browse the repository at this point in the history
Fixes a regression introduced by commit
75ec16e: 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: rpm-software-management#1189
  • Loading branch information
pmatilai committed Apr 22, 2020
1 parent 5d8c6e5 commit c50b27d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/depends.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,17 +1040,17 @@ 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);
if (reqnothash && depexistsHashHasEntry(reqnothash, rpmdsNId(provides)))
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);

Expand Down

0 comments on commit c50b27d

Please sign in to comment.