Bug 1271130 - Solver does not work correctly for packages installed from command line
Solver does not work correctly for packages installed from command line
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-13 04:35 EDT by Vít Ondruch
Modified: 2015-10-13 05:36 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-13 05:36:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
--debugsolver output (7.61 MB, application/x-gzip)
2015-10-13 04:35 EDT, Vít Ondruch
no flags Details

  None (edit)
Description Vít Ondruch 2015-10-13 04:35:30 EDT
Created attachment 1082300 [details]
--debugsolver output

Description of problem:
For testing purposes, I quite often do something like:

sudo dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 24 install https://kojipkgs.fedoraproject.org//work/tasks/3246/11423246/vagrant-1.7.4-2.fc24.noarch.rpm --setopt=tsflags=nocontexts

This means that the vagrant package is available twice, once in the fedora repository and my version of the package, specified from the command line.

The updated package solves two issues:

1) It relaxes dependency on rubygem(bundler), since Bundler in Fedora in more recent version then Vagrant specifies.

2) It adds soft dependency: Recommends: vagrant(vagrant-libvirt)

Now the problem is, that whenever I try to install the updated package via the command above, the vagrant-libvirt is never installed, it is always just skipped.

I believe that DNF gets lost in the dependencies. I have not real proof at my hand, but the chain is probably as follows IMO:

vagrant (cmdline) -> vagrant-libvirt (fedora) -> rubygem-bundler (fedora) -> vagrant (fedora)

But that last dependency, i.e. rubygem-bundler (fedora) -> vagrant (fedora) is broken ATM in Fedora repository, while it is fixed by the package specified on cmdline and should be resolved.

IOW, the solver gets confused on some place by multiple possibilities, i.e. vagrant from cmdline vs vagrant from repo and it just decides to not install anything, instead installing the most recent versions which fits together just fine.

Please see attached debugdata. Hopefully they will make more sense to you then this naive description ;)


Version-Release number of selected component (if applicable):
$ rpm -q dnf
dnf-1.1.2-4.fc24.noarch
$ rpm -q libsolv
libsolv-0.6.12-1.fc24.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Soft dependencies from package specified on command line are not resolved correctly due to broken dependencies in enabled repositories.


Expected results:
The package specified on command line has the highest priority amongst other packages from different repositories


Additional info:
Comment 1 Vít Ondruch 2015-10-13 04:40:04 EDT
This is the mock config I used initially to create the buildroot:

$ cat /etc/mock/fedora-rawhide-x86_64.cfg 
config_opts['root'] = 'fedora-rawhide-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
config_opts['dist'] = 'rawhide'  # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['releasever'] = '24'

config_opts['package_manager'] = 'dnf'

config_opts['yum.conf'] = """
[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
install_weak_deps=0
metadata_expire=0

# repos

[fedora]
name=fedora
metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch
failovermethod=priority

[local]
name=local
baseurl=http://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/
cost=2000
enabled=1

[debug]
name=Fedora Rawhide - x86_64 - Debug
failovermethod=priority
metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide-debug&arch=$basearch
enabled=0
"""


i.e. this is the dnf repository configuration:



$ cat /var/lib/mock/fedora-rawhide-x86_64/root/etc/dnf/dnf.conf 

[main]
keepcache=1
debuglevel=2
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
install_weak_deps=0
metadata_expire=0

# repos

[fedora]
name=fedora
metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch
failovermethod=priority

[local]
name=local
baseurl=http://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/
cost=2000
enabled=1

[debug]
name=Fedora Rawhide - x86_64 - Debug
failovermethod=priority
metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide-debug&arch=$basearch
enabled=0



Please note that the "local" repository is enabled in contrary to defaults.
Comment 2 Vít Ondruch 2015-10-13 05:36:32 EDT
Actually, I have simpler reproducer now. I'll rather fill new bug, since I overcomplicated this ...

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