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

NEVR provides in source package lead to rpmbuild errors #1189

Closed
mlschroe opened this issue Apr 21, 2020 · 6 comments · Fixed by #1192
Closed

NEVR provides in source package lead to rpmbuild errors #1189

mlschroe opened this issue Apr 21, 2020 · 6 comments · Fixed by #1192
Milestone

Comments

@mlschroe
Copy link
Contributor

This is a regression caused by commit 75ec16e. The provides added to the source rpms will be checked against the dependencies of the installed packages. Because of this you will get an error if you try to build an rpm where the package name matches a conflict of an installed package.

I.e.:

error: Failed build dependencies:
        bash <= 2.0.4-21 conflicts with (installed) setup-2.8.71-2.fc20.noarch
@pmatilai pmatilai added the bug label Apr 22, 2020
@pmatilai
Copy link
Member

Ack, I'll look into it. Thanks for reporting.

@pmatilai pmatilai added this to the 4.16.0 milestone Apr 22, 2020
@pmatilai pmatilai added REGRESSION and removed bug labels Apr 22, 2020
pmatilai added a commit to pmatilai/rpm that referenced this issue Apr 22, 2020
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. Which obviously doesn't make any sense,

Explicitly skip checks against source provides, similarly to what we
already did with obsoletes.

Fixes: rpm-software-management#1189
@mlschroe
Copy link
Contributor Author

I wonder if the added provides also can lead to problems if we have a transaction with both source and binary packages. The provides from the source packages must not satisfy the dependencies of the binary packages.

Another thing to test would be a spec file that has a BuildRequires to one of the packages it builds. For example, gcc.spec might have a BuildRequires: gcc.

@pmatilai
Copy link
Member

Another thing to test would be a spec file that has a BuildRequires to one of the packages it builds. For example, gcc.spec might have a BuildRequires: gcc.

This case is indeed affected too, but also cured by #1192. However the commit message end comments in the PR are off the mark a bit, I'll update...

@mlschroe
Copy link
Contributor Author

Why is that cured by #1192? It just changes things for conflicts of installed packages. My example was about a build requires being satisfied by a provides of a source package. I think this needs to be fixed in rpmal.c

pmatilai added a commit to pmatilai/rpm that referenced this issue Apr 22, 2020
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
@pmatilai
Copy link
Member

Oops, false testing+thinking on my behalf. Too much disturbance in the force today...

pmatilai added a commit to pmatilai/rpm that referenced this issue Apr 22, 2020
Fixes regressions from commit 75ec16e:
the newly added provides of to-be-built packages were being used for
dependency resolution, such as spec satifying its own buildrequires,
and matched against conflicts in installed packages.

Source packages cannot obsolete anything or provide capabilities or files
to transactions, don't add them to rpmal at all. Explicitly skip checks
against source provides, similarly to what we already did with obsoletes.

Fixes: rpm-software-management#1189
@pmatilai
Copy link
Member

Okay, now it should really be covered by #1192.

pmatilai added a commit that referenced this issue Apr 22, 2020
Fixes regressions from commit 75ec16e:
the newly added provides of to-be-built packages were being used for
dependency resolution, such as spec satifying its own buildrequires,
and matched against conflicts in installed packages.

Source packages cannot obsolete anything or provide capabilities or files
to transactions, don't add them to rpmal at all. Explicitly skip checks
against source provides, similarly to what we already did with obsoletes.

Fixes: #1189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants