Bug 1550006 - dnf download --resolve fails for java-1.8.0-openjdk
Summary: dnf download --resolve fails for java-1.8.0-openjdk
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-28 09:37 UTC by Alexander Todorov
Modified: 2018-06-28 08:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 08:35:45 UTC


Attachments (Terms of Use)

Description Alexander Todorov 2018-02-28 09:37:23 UTC
Description of problem:

I'm using dnf inside a test script to resolve dependencies and download RPMs locally. The following command works fine:

# dnf install --releasever=26 --downloadonly --downloaddir=/tmp/dnf.download.2 --installroot=/tmp/dnf.root.2 java-1.8.0-openjdk-1.8.0.*


however it requires root privileges and we want to run as non-root. So I tried:

$ dnf download -v --releasever=26 --resolve --best --forcearch x86_64 --downloaddir=/tmp/dnf.download.1 --installroot=/tmp/dnf.install.1 java-1.8.0-openjdk-1.8.0.* 

This fails with:

Error in resolve


After adding some debugging into to download.py
```
            for msg in goal.problems:
                logger.debug(msg)
```

I got:


package java-1.8.0-openjdk-1:1.8.0.131-7.b12.fc26.i686 requires java-1.8.0-openjdk-headless(x86-32) = 1:1.8.0.131-7.b12.fc26, but none of the providers can be installed


Version-Release number of selected component (if applicable):

python3-dnf-plugins-core-2.1.5-4.fc27.noarch
dnf-2.7.5-2.fc27.noarch

How reproducible:
Always


Additional info:


Looking at the code inside download.py I get the feeling that the underlying hawkey.Goal object is not setup properly. In any case there is a self._goal object created in dnf's base.py so maybe use that.

Comment 1 Jaroslav Mracek 2018-03-19 11:42:01 UTC
Please can you try "dnf download -v --releasever=26 --resolve --best --forcearch x86_64 --downloaddir=/tmp/dnf.download.1 --installroot=/tmp/dnf.install.1 java-1.8.0-openjdk-1.8.0.*.x86_64"

Comment 2 Jaroslav Mracek 2018-03-19 12:11:42 UTC
The reason why you experience the problem is that it tries to resolve the transaction for i686 package together with x86_64 package. Unfortunately download always tries to handle every architecture, therefore in some combination it provides different result then install command. But I think that the real issue here is reporting of errors, therefore I created a patch that should enhance behavior (https://github.com/rpm-software-management/dnf-plugins-core/pull/248). Hope that it helps.

Comment 3 Jaroslav Mracek 2018-06-28 08:35:45 UTC
The issue is solved by dnf-plugins-core-3.0.1-1 that was released into rawhide.


Note You need to log in before you can comment on or make changes to this bug.