Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1399615 - mock --init skips packages due to conflicts
Summary: mock --init skips packages due to conflicts
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 25
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1398040
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-29 12:28 UTC by Oliver Henshaw
Modified: 2017-06-26 12:00 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-26 12:00:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
output from 'mock --init' on freshly installed and updated F25 VM (deleted)
2016-11-29 12:28 UTC, Oliver Henshaw
no flags Details
output from 'dnf install @buildsys-build' to an installroot on freshly installed and updated F25 VM (deleted)
2016-11-29 12:32 UTC, Oliver Henshaw
no flags Details
dnf.conf used in the reproducer (standard mock config) (deleted)
2016-12-13 11:50 UTC, Miroslav Suchý
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1398040 0 unspecified CLOSED dnf calls weak dependencies "Skipping packages with broken dependencies" 2021-02-22 00:41:40 UTC

Internal Links: 1398040

Description Oliver Henshaw 2016-11-29 12:28:46 UTC
Created attachment 1225803 [details]
output from 'mock --init' on freshly installed and updated F25 VM

Description of problem:

'mock --init' installs 160 packages but skips 45 packages "with conflicts". I first noticed this on F23 when trying to build packages for F25 (and F24) but can also reproduce it on F25 itself.

Version-Release number of selected component (if applicable):
mock-1.3.2-1.fc25.noarch
dnf-1.1.10-3.fc25.noarch
rpm-4.13.0-4.fc25.x86_64

How reproducible:
$ mock --init
...

Transaction Summary
=============================================================================================================================
Install  160 Packages
Skip      45 Packages
...

(see attached logs for the full output)


Expected results:

The group installs with no conflicts.

Comment 1 Oliver Henshaw 2016-11-29 12:32:34 UTC
Created attachment 1225806 [details]
output from 'dnf install @buildsys-build' to an installroot on freshly installed and updated F25 VM

Installing the packages in an installroot with dnf installs all 205 packages, so maybe there's something mock is doing?

# dnf --installroot /root/dnf-test --releasever 25 install @buildsys-build
...
Transaction Summary
=============================================================================================================================
Install  205 Packages

Total download size: 138 M
Installed size: 534 M
...

(see attached file for full logs

Comment 2 Miroslav Suchý 2016-11-30 13:26:51 UTC
I can reproduce it.
mock --scrub=all
mock --init

Comment 3 Oliver Henshaw 2016-12-12 14:40:06 UTC
This seems like it could be a problem if the buildroot ends up missing some important (but optional) dependency that a package relies on, and it isn't explicitly pulled on: i.e. the package is built without libsomefundamentalfeature and automagically configures the feature off.

Comment 4 Miroslav Suchý 2016-12-13 11:48:32 UTC
Here comes full reproducer. Just with DNF (therefore moving to DNF team):

mkdir -p /tmp/3/etc/dnf
# I am attaching this dnf.conf
# but you can create it by: mock -r fedora-24-x86_64 --init
# and it will be created in this location
cp /var/lib/mock/fedora-24-x86_64/root/etc/dnf/dnf.conf /tmp/3/etc/dnf/
# this is what mock is running
sudo /usr/bin/dnf --installroot /tmp/3 --releasever 24 --disableplugin=local --setopt=deltarpm=false install @buildsys-build

For some reason DNF things that some packages are already installed in that installroot. Although there is no rpmdb at all. And no other files but dnf.conf

Reproduced with: dnf-1.1.10-4.fc25.noarch

Comment 5 Miroslav Suchý 2016-12-13 11:50:09 UTC
Created attachment 1231170 [details]
dnf.conf used in the reproducer (standard mock config)

Comment 6 Oliver Henshaw 2016-12-13 12:12:26 UTC
(In reply to Oliver Henshaw from comment #3)
> This seems like it could be a problem if the buildroot ends up missing some
> important (but optional) dependency that a package relies on, and it isn't
> explicitly pulled on: i.e. the package is built without
> libsomefundamentalfeature and automagically configures the feature off.

Indeed, a locally rebuilt systemd-231-10.fc25 (with minor logging patches) loses liblz4.so.1() from its Requires.

Comment 7 Oliver Henshaw 2016-12-13 13:04:09 UTC
(In reply to Miroslav Suchý from comment #5)
> Created attachment 1231170 [details]
> dnf.conf used in the reproducer (standard mock config)

With no dnf.conf:
# /usr/bin/dnf --installroot /tmp/3 --releasever 24 --disableplugin=local --setopt=install_weak_deps=0 --setopt=deltarpm=false install @buildsys-build

reproduces.

Comment 8 Oliver Henshaw 2016-12-13 15:49:15 UTC
(In reply to Oliver Henshaw from comment #6)
> (In reply to Oliver Henshaw from comment #3)
> > This seems like it could be a problem if the buildroot ends up missing some
> > important (but optional) dependency that a package relies on, and it isn't
> > explicitly pulled on: i.e. the package is built without
> > libsomefundamentalfeature and automagically configures the feature off.
> 
> Indeed, a locally rebuilt systemd-231-10.fc25 (with minor logging patches)
> loses liblz4.so.1() from its Requires.

Actually, this looks like it was a fallout from lz4 changing its version numbering scheme (and the new version was released in f25 updates) - https://github.com/systemd/systemd/commit/3d4cf7de48a74726694abbaa09f9804b845ff3ba probably fixes this.

Comment 9 Igor Gnatenko 2017-01-02 08:23:04 UTC
This is basically packages which are newer, but solver choosed to not install them (in this case it doesn't fullfil requirements of systemd).

Comment 10 Miroslav Suchý 2017-06-26 09:10:55 UTC
Trying to reproduce with dnf-2.5.1-1.fc26.noarch
I am not able to reproduce the initial bug. All those packages are installed. But...

sudo rm -rf /tmp/3
mkdir -p /tmp/3/etc/dnf/
mock -r fedora-26-x86_64 --init --no-bootstrap-chroot
cp /var/lib/mock/fedora-26-x86_64/root/etc/dnf/dnf.conf /tmp/3/etc/dnf/
sudo /usr/bin/dnf --installroot /tmp/3 --releasever 26 --disableplugin=local --setopt=deltarpm=false list

gives me full list of packages installed on host and not in specified installroot. It should produce empty list.

Comment 11 Jaroslav Mracek 2017-06-26 12:00:08 UTC
For the list command, it is necessary to use --installed option to get only installed packages. With that option I got empty list (dnf-2.5.1-1). Thanks Miroslav a lot for your help and testing.


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