Bug 1442005 - --short-circuit option does not work
Summary: --short-circuit option does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-13 09:54 UTC by Vít Ondruch
Modified: 2017-07-04 01:52 UTC (History)
6 users (show)

Fixed In Version: mock-1.4.2-1.fc26 mock-1.4.2-1.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-25 16:20:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vít Ondruch 2017-04-13 09:54:04 UTC
Description of problem:
The "--short-circuit" options is not properly handled. When I use it, is just reports "error: failed to stat // --short-circuit: No such file or directory" and the build fails.



Version-Release number of selected component (if applicable):
$ rpm -q mock
mock-1.3.4-1.fc26.noarch


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
The build fails and the --short-circuit option is ignored

Expected results:
The "prep" part of the build is executed.


Additional info:
~~~
$ LANG=C.utf-8 mock -r fedora-rawhide-x86_64 --offline diorite-0.3.3-0.1git7e26836.fc27.src.rpm --short-circuit=prep
INFO: mock.py version 1.3.4 starting (python version = 3.6.1)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(diorite-0.3.3-0.1git7e26836.fc27.src.rpm)  Config(fedora-rawhide-x86_64)
Start: chroot init
INFO: LVM plugin enabled. Allocated pool data: 52.93%. Allocated metadata: 29.36%.
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
INFO: enabled HW Info plugin
Mock Version: 1.3.4
INFO: Mock Version: 1.3.4
Finish: chroot init
Start: build phase for diorite-0.3.3-0.1git7e26836.fc27.src.rpm
Start: build setup for diorite-0.3.3-0.1git7e26836.fc27.src.rpm
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/diorite-0.3.3-0.1git7e26836.fc27.src.rpm
Last metadata expiration check: 0:13:27 ago on Thu Apr 13 11:36:06 2017 CEST.
Package vala-0.36.1-1.fc27.x86_64 is already installed, skipping.
Package gtk3-devel-3.22.12-1.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
Finish: build setup for diorite-0.3.3-0.1git7e26836.fc27.src.rpm
Start: rpmbuild diorite-0.3.3-0.1git7e26836.fc27.src.rpm
error: failed to stat // --short-circuit: No such file or directory
Building target platforms: x86_64
Building for target x86_64
ERROR: Exception(diorite-0.3.3-0.1git7e26836.fc27.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 1 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: Command failed. See logs for output.
 # /usr/bin/systemd-nspawn -q -M 6d0286f8057e4f2db3e7f601d6356d6d -D /var/lib/mock/fedora-rawhide-x86_64/root -a --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.utf-8 -u mockbuild /usr/bin/rpmbuild -bp  --short-circuit --target x86_64 --nodeps /builddir/build/SPECS/diorite.spec
~~~

Comment 1 Miroslav Suchý 2017-04-25 11:15:01 UTC
Hmm first - according 'man rpmbuild' options '--short-circuit' and '-bp' is not valid combination. So we need to alter mock documentation.

But this error happen happen even with '-bi'.

The reproducer is:
1. mock  /tmp/tito/mock-1.4.0-0.git.59.3e15fc0.fc26.src.rpm --no-clean
2. sudo '/usr/bin/systemd-nspawn' '-q' '-M' 'bfdc3846268d4d74b5501bb03a1ef077' '-D' '/var/lib/mock/fedora-24-x86_64/root' '-a'  '--setenv=SHELL=/bin/bash' '--setenv=HOME=/builddir' '--setenv=HOSTNAME=mock' '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin'  '-u' 'mockbuild' '/usr/bin/rpmbuild' '-bi' ' --short-circuit' '--target' 'x86_64' '--nodeps' '/builddir/build/SPECS/mock.spec'

Building target platforms: x86_64
Building for target x86_64
error: failed to stat // --short-circuit: No such file or directory

Got it! The problem is the leading space before --short-circuit.

Comment 2 Miroslav Suchý 2017-04-25 11:17:50 UTC
Hmm -bp is not valid according the documentation, but is accepted by rpmbuild. So I will keep it there.

Leading space removed in commit 5208f36.

Comment 3 Fedora Update System 2017-04-26 13:39:41 UTC
mock-1.4.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-99d7379d09

Comment 4 Fedora Update System 2017-04-26 19:19:28 UTC
mock-1.4.1-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-f7ba52fb50

Comment 5 Fedora Update System 2017-04-26 21:53:28 UTC
mock-1.4.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-99d7379d09

Comment 6 Fedora Update System 2017-04-27 06:49:08 UTC
mock-1.4.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6b4200df6e

Comment 7 Fedora Update System 2017-06-19 07:13:10 UTC
mock-1.4.2-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-21b345dd60

Comment 8 Fedora Update System 2017-06-19 07:14:08 UTC
mock-1.4.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3d88d9f8b5

Comment 9 Fedora Update System 2017-06-19 15:52:45 UTC
mock-1.4.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-21b345dd60

Comment 10 Fedora Update System 2017-06-19 19:24:57 UTC
mock-1.4.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3d88d9f8b5

Comment 11 Fedora Update System 2017-06-25 16:20:07 UTC
mock-1.4.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2017-07-04 01:52:03 UTC
mock-1.4.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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