Bug 668222 - cleanup_on_success from config not honored
Summary: cleanup_on_success from config not honored
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-09 08:48 UTC by Remi Collet
Modified: 2013-01-10 06:24 UTC (History)
7 users (show)

Fixed In Version: mock-1.1.10-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 04:38:49 UTC


Attachments (Terms of Use)
mock.patch (408 bytes, patch)
2011-01-09 08:48 UTC, Remi Collet
no flags Details | Diff

Description Remi Collet 2011-01-09 08:48:05 UTC
Created attachment 472404 [details]
mock.patch

Description of problem:
cleanup_on_success from config not honored 

From config:
config_opts['basedir'] = '/dev/shm/'
config_opts['resultdir'] = "/var/lib/mock/result"
config_opts['cleanup_on_success'] = True


Version-Release number of selected component (if applicable):
1.1.7-1.fc14 

Additional info:
The check done in cleanup_on_success erased this option, even if resultdir is separated from basedir.

The simple attached patch seems to work (could be improved, because it test basedir instead of basedir/root) but my python skill are really limited.

Comment 1 Mike McLean 2011-01-18 15:00:01 UTC
some additional patches were submitted here:
https://fedorahosted.org/mock/ticket/12

Comment 2 Remi Collet 2011-01-18 18:11:37 UTC
Another issue linked with this one :

$ mock -r someconfig  rebuild  foo.src.rpm   bar.src.rpm
ERROR: Must specify --resultdir when building multiple RPMS.

This error shouldn't be raised when resuldir is set in config file.

Comment 3 Mathieu Bridon 2011-01-21 02:22:08 UTC
Sorry about the duplication in the mock BTS, I thought that patches to the Git HEAD would be more appropriate over there.

Any comments on the patches?

Comment 4 Clark Williams 2011-01-21 15:48:26 UTC
Mathieu,

I like the way that Remi solved the resultdir+cleanup issue, since he just used the Python 'in' operator. 

I will pull in the second and third patches though.

Comment 5 Remi Collet 2011-01-21 16:24:56 UTC
Mathieu patch (even if a little heavy) works well (I'm using it for a few days), while mine doesn't handle all cases

This cases should be accepted as result in distinct tree (refused by my "too much trivial" patch):

basedir=/tmp
resultdir=/var/tmp

basedir=/var/lib/mock
resultdir=/var/lib/mock/result

Comment 6 Clark Williams 2011-01-21 16:36:11 UTC
Remi, 

Ok, we can pull bits from both :)

Comment 7 Mathieu Bridon 2011-01-24 02:04:36 UTC
(In reply to comment #4)
> Mathieu,
> 
> I like the way that Remi solved the resultdir+cleanup issue, since he just used
> the Python 'in' operator. 

As long as we don't expect Mock to run on non-Unix platforms where Python runs that's fine.

And as long as Linux doesn't change its path separator, but that's very unlikely in the near future. :)

As Remi said, the only thing that really matters it that the test for "should we force not clearing the root dir" must be "is the result dir inside the root dir?". The rest is just an implementation detail.

Comment 8 Fedora Admin XMLRPC Client 2011-03-11 18:10:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Levente Farkas 2011-04-04 20:19:22 UTC
does any solution to this bug already applied to the git?

Comment 10 Clark Williams 2011-05-07 13:45:40 UTC
I went back and added Mathieu's patchset since it does cover a more complete patcheset. Look in my 'work' branch of git for what I've done. 

queued for 1.1.10/1.0.17 build which should appear in testing next week.

Comment 11 Levente Farkas 2011-05-08 10:02:40 UTC
would it be possible to revert also the way as mock shows the missing dependency packages. fedore 1.1.9 it shows all missing package but now only show the first missing one. imho the old root log file was more useful.
thanks.

Comment 12 Clark Williams 2011-05-08 14:57:55 UTC
(In reply to comment #11)
> would it be possible to revert also the way as mock shows the missing
> dependency packages. fedore 1.1.9 it shows all missing package but now only
> show the first missing one. imho the old root log file was more useful.
> thanks.

Hmmm, I don't think we changed anything that *should* affect the error output. Would you post the output you liked and what it is now so I can track down what section of code generates it?

Comment 13 Fedora Update System 2011-05-13 20:32:35 UTC
mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15

Comment 14 Fedora Update System 2011-05-13 20:37:37 UTC
mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14

Comment 15 Fedora Update System 2011-05-13 20:41:53 UTC
mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5

Comment 16 Fedora Update System 2011-05-13 20:46:05 UTC
mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13

Comment 17 Fedora Update System 2011-05-13 20:50:21 UTC
mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6

Comment 18 Fedora Update System 2011-05-14 00:02:32 UTC
Package mock-1.1.10-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.1.10-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2011-05-19 04:34:06 UTC
mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2011-05-25 02:41:25 UTC
mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2011-05-25 03:15:53 UTC
mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Levente Farkas 2011-05-31 13:23:40 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > would it be possible to revert also the way as mock shows the missing
> > dependency packages. fedore 1.1.9 it shows all missing package but now only
> > show the first missing one. imho the old root log file was more useful.
> > thanks.
> 
> Hmmm, I don't think we changed anything that *should* affect the error output.
> Would you post the output you liked and what it is now so I can track down what
> section of code generates it?

just make any rpm which has more than one BuildRequires and try to build in mock. now only one missing packages shown.

Comment 23 Fedora Update System 2011-06-02 19:05:36 UTC
mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2011-06-02 19:15:40 UTC
mock-1.1.10-1.el6 has been pushed to the Fedora EPEL 6 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.