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

Fix incorrect handling richdeps in buildep (RhBug:1756902) #362

Merged
merged 1 commit into from Oct 21, 2019

Conversation

j-mracek
Copy link
Member

Solver must decide whether richdeps that has no matches is required or
it can be skipped.

https://bugzilla.redhat.com/show_bug.cgi?id=1756902

Solver must decide whether richdeps that has no matches is required or
it can be skipped.

https://bugzilla.redhat.com/show_bug.cgi?id=1756902
@j-mracek
Copy link
Member Author

@rh-atomic-bot try

@rh-atomic-bot
Copy link

⌛ Trying commit df83e44 with merge 3be9094...

rh-atomic-bot pushed a commit that referenced this pull request Sep 30, 2019
Solver must decide whether richdeps that has no matches is required or
it can be skipped.

https://bugzilla.redhat.com/show_bug.cgi?id=1756902

Closes: #362
Approved by: <try>
@xsuchy
Copy link
Member

xsuchy commented Sep 30, 2019

It works on the reproducer. However on

BuildRequires:  python3
BuildRequires:  (python3dist(non-exist) if python3 < 4.0.0)

It prints:

$ LC_ALL=C sudo /usr/bin/dnf builddep --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 32 --setopt=deltarpm=False --allowerasing  /home/msuchy/rpmbuild/SRPMS/evil-1-1.fc31.src.rpm 
fedora                                                                                    24 kB/s |  20 kB     00:00    
Package python3-3.8.0~b4-1.fc32.x86_64 is already installed.
Error: 
 Problem: cannot install the best candidate for the job
  - conflicting requests
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages

which does not give hint what is wrong. :(

@hroncok
Copy link

hroncok commented Sep 30, 2019

I've applied this patch on top of the Fedora's 4.0.9-1.fc30 and reinstalled python3-dnf-plugins-core and dnf-plugins-core.

BuildRequires:  python3
BuildRequires:  (python3dist(importlib-metadata) if python3 < 3.8)

Works fine:

Package python3-3.8.0~b4-1.fc32.x86_64 is already installed.
Dependencies resolved.
Nothing to do.

Even if the package exists:

BuildRequires:  python3
BuildRequires:  (python3dist(six) if python3 < 3.8)

It doesn't install it:

Package python3-3.8.0~b4-1.fc32.x86_64 is already installed.
Dependencies resolved.
Nothing to do.

However, when the depndency is broken:

BuildRequires:  python3
BuildRequires:  (python3dist(xxxxxxxxxxx) if python3)

The output is cryptic:

Package python3-3.8.0~b4-1.fc32.x86_64 is already installed.
Error: 
 Problem: cannot install the best candidate for the job
  - conflicting requests
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

@rh-atomic-bot
Copy link

💔 Test failed - status-papr

@j-mracek
Copy link
Member Author

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Trying commit df83e44 with merge 8748989...

rh-atomic-bot pushed a commit that referenced this pull request Sep 30, 2019
Solver must decide whether richdeps that has no matches is required or
it can be skipped.

https://bugzilla.redhat.com/show_bug.cgi?id=1756902

Closes: #362
Approved by: <try>
@j-mracek
Copy link
Member Author

In case of dependency problems, the output is generated by libsolv, therefore the report issue cannot be resolved by patch in dnf. I have a plan to create an issue on libsolv.

@rh-atomic-bot
Copy link

☀️ Test successful - status-papr
State: approved= try=True

@m-blaha m-blaha merged commit 3d2ddd9 into rpm-software-management:master Oct 21, 2019
@hroncok
Copy link

hroncok commented Oct 21, 2019

Is there a follow-up libsolv issue?

@j-mracek
Copy link
Member Author

@hroncok Sorry Miro, not yet (about missing details in error). But there is a plan.

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

Successfully merging this pull request may close these issues.

None yet

5 participants