Bug 1171601 - fedora-review does not clean up buildroot when mock fails
Summary: fedora-review does not clean up buildroot when mock fails
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-review
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stanislav Ochotnicky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-08 08:26 UTC by Miroslav Suchý
Modified: 2015-04-16 15:08 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-16 15:08:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2014-12-08 08:26:39 UTC
Description of problem:
fedora-review runs:
  mock -v --no-cleanup-after --no-clean --resultdir=/tmp/kosmtik/results --rebuild /tmp/kosmtik-0.0.9-1.fc20.src.rpm
but that is problematic. When previous build failed, then
  /var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/SRPMS
contains previous src.rpm and consequently mock will fail with:
  Expected to find single rebuilt srpm, found 2.
You either should not use --no-clean, or utilize --uniqueext=FOO for different reviews or clean buildroot when build fail.
 
Version-Release number of selected component (if applicable):
fedora-review-0.5.2-1.fc21.noarch

How reproducible:
always

Steps to Reproduce:
1. do one review when build fail (hitting Ctlr+C in right time is probably good as well)
2. do another review
3. fedora-review -v -rn kosmtik.src.rpm

Actual results:
ERROR: Exception(/tmp/kosmtik-0.0.9-1.fc20.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /tmp/kosmtik/results
ERROR: Expected to find single rebuilt srpm, found 2.

Comment 1 Sergio Basto 2014-12-20 22:47:50 UTC
yeah I also got: 

ERROR: Expected to find single rebuilt srpm, found 2.

ll /var/lib/mock/fedora-20-x86_64/root/builddir/build/SRPMS/
total 27760
-rw-rw-r-- 1 sergio mock   174429 Dez 17 02:39 patchutils-0.3.3-9.fc20.src.rpm
-rw-rw-r-- 1 sergio mock 28245953 Dez 20 22:40 filetodoay

Comment 2 Sergio Basto 2014-12-21 14:10:17 UTC
With mock of Fedora 20 updates-stable , Now I got this problem , when build with
a second package with: 
mock -r fedora-20-x86_64 --no-clean --rebuild ./mypackage.fc20.src.rpm 

Now I have to do : 
rm -rf /var/lib/mock/fedora-20-x86_64/root/builddir/build/

Comment 3 Mukundan Ragavan 2015-01-06 01:31:25 UTC
See this with fedora-review

$ fedora-review -m fedora-rawhide-x86_64 -b 1178191
[ ... ]

ERROR: Expected to find single rebuilt srpm, found 2.
ERROR: 'mock build failed, see /home/mukundan/ownCloud/pkg_reviews/1178191-python-sane/results/build.log'


But, after downgrading to **mock-1.1.41** on F21, I am able to run fedora-review successfully.

Comment 4 Miroslav Suchý 2015-01-06 09:46:53 UTC
Because mock-1.1.41 was clearing always /builddir, even when --no-clean was passed. This was fixed in mock, however the fix in mock revealed this bug in fedora-review.

Comment 5 Sergio Basto 2015-01-06 17:31:53 UTC
(In reply to Miroslav Suchý from comment #4)
> Because mock-1.1.41 was clearing always /builddir, even when --no-clean was
> passed. This was fixed in mock, however the fix in mock revealed this bug in
> fedora-review.

no , mock should clear always /builddir, even when --no-clean .

Comment 6 Miroslav Suchý 2015-01-06 20:08:51 UTC
nope. see bug 483486

Comment 7 Sergio Basto 2015-01-06 20:17:44 UTC
I will look at it when got some spare time , mean while see bug 1173126

Comment 8 Jaroslav Reznik 2015-03-03 16:34:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 9 Alec Leamas 2015-04-16 15:08:33 UTC
Fixed in https://fedorahosted.org/FedoraReview/changeset/853f0b84fd9ce8d


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