Bug 1392061

Summary: dnf should fail builds if unpacking of dependencies fails
Product: [Fedora] Fedora Reporter: Zbigniew Jędrzejewski-Szmek <zbyszek>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, jlebon, jmracek, mebrown, mluscon, msimacek, msuchy, packaging-team-maint, pnemade, praiskup, rpm-software-management, vmukhame, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 12:25:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zbigniew Jędrzejewski-Szmek 2016-11-04 17:10:04 UTC
Description of problem:
systemd is failing in unpacking phase during buildroot initialization:

DEBUG util.py:421:  Running transaction
DEBUG util.py:421:  error: unpacking of archive failed on file /etc/dbus-1/system.d/org.freedesktop.hostname1.conf;581cbd74: cpio: open
DEBUG util.py:421:  error: systemd-232-2.fc26.x86_64: install failed
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  Error unpacking rpm package systemd-232-2.fc26.x86_64
DEBUG util.py:421:  Error unpacking rpm package systemd-232-2.fc26.x86_64
DEBUG util.py:421:  systemd-232-2.fc26.x86_64 was supposed to be installed but is not!

It seems pointless to continue.

Version-Release number of selected component (if applicable):
Not entirely sure, this is on koshei.
The log says:
INFO buildroot.py:318:  Mock Version: 1.2.21

How reproducible:
Not 100%, I cannot reproduce this locally.

http://koji.fedoraproject.org/koji/taskinfo?taskID=16289297 
http://koji.fedoraproject.org/koji/taskinfo?taskID=16289303 
http://koji.fedoraproject.org/koji/taskinfo?taskID=16289308 
http://koji.fedoraproject.org/koji/taskinfo?taskID=16289313 
http://koji.fedoraproject.org/koji/taskinfo?taskID=16289311

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-11-04 17:27:18 UTC
It's not clear if dnf exits with an error or not. Sometimes it seems to, but sometimes not:
https://kojipkgs.fedoraproject.org//work/tasks/9161/16289161/root.log:

DEBUG util.py:421:  Running transaction
DEBUG util.py:421:  error: unpacking of archive failed on file /etc/dbus-1/system.d/org.freedesktop.hostname1.conf;581cbd74: cpio: open
DEBUG util.py:421:  error: systemd-232-2.fc26.x86_64: install failed
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  Error unpacking rpm package systemd-232-2.fc26.x86_64
DEBUG util.py:421:  Error unpacking rpm package systemd-232-2.fc26.x86_64
DEBUG util.py:421:  systemd-232-2.fc26.x86_64 was supposed to be installed but is not!
...
DEBUG util.py:421:  Failed:
DEBUG util.py:421:    systemd.x86_64 232-2.fc26                                                     
DEBUG util.py:421:  Complete!
DEBUG util.py:557:  Child return code was: 0

Comment 2 Zbigniew Jędrzejewski-Szmek 2016-11-04 17:33:41 UTC
http://koji.fedoraproject.org/koji/taskinfo?taskID=16288989
https://kojipkgs.fedoraproject.org//work/tasks/8989/16288989/root.log
...
DEBUG util.py:557:  Child return code was: 1

and that build does not continue. So mock seems to fail the build properly when a subcommand returns an error.

Reassigning to dnf.

Comment 3 Jaroslav Mracek 2016-11-07 12:25:19 UTC
The return code should be fixed by pull-request: https://github.com/rpm-software-management/dnf/pull/552

Hope that it solve sufficiently your problem

*** This bug has been marked as a duplicate of bug 1341086 ***