Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't check source package provides against installed conflicts #1192

Merged
merged 1 commit into from
Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 4 additions & 0 deletions lib/rpmal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down