Bug 1169126 - mock downloads packages every build
Summary: mock downloads packages every build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Simacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-30 14:50 UTC by Richard Shaw
Modified: 2015-02-20 00:33 UTC (History)
7 users (show)

Fixed In Version: mock-1.2.6-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-21 23:09:12 UTC


Attachments (Terms of Use)

Description Richard Shaw 2014-11-30 14:50:57 UTC
Description of problem:
I've been running the 1.2.x packages on my Fedora 20 x86_64 box to take advantage of the nosync option which greatly speeds up builds.

Yesterday I noticed that when doing repeated builds that all packages were being downloaded every run. I have only the following customizations in site-defaults.cfg:

config_opts['cleanup_on_failure'] = 0
config_opts['nosync'] = True
config_opts['macros']['%_smp_mflags'] = "-j6"
config_opts['package_manager'] = 'dnf'


Version-Release number of selected component (if applicable):
mock-1.2.1-1.fc20.noarch

Comment 1 Richard Shaw 2014-11-30 22:18:23 UTC
Additional information:

I did some digging and figured out it only happens with dnf, not yum.

Comment 2 Michael Simacek 2014-12-01 08:22:36 UTC
Confirmed. DNF uses different path to cache and I didn't notice, beacuse I have it explicitly set. You can put
cachedir=/var/cache/yum
into your config_opts['yum.conf'] to make it work, but it's not a proper solution. I'll fix it.

Comment 3 Michael Simacek 2014-12-01 09:27:44 UTC
Hmm, the cachedir option is also set in the default configs. Seems like a different problem, so ignore the previous comment.

Comment 4 Michael Simacek 2014-12-12 12:38:25 UTC
It turns out that dnf's default is to throw away downloaded packages after successful transaction. Therefore we need to explicitly set keepcache=1 in yum.conf. I sent patch upstream that changes the default configs.
For now, you can just add
keepcache=1
in line into [main] section of your config_opts['yum.conf']

Comment 5 Richard Shaw 2014-12-12 14:08:56 UTC
It looks like that has to be done per chroot config file? I think I'll wait for the fix...

That does bring up a good question though, it looks like the yum config option in [main] are more or less the same for all chroots. Is there a way to pull those options into site-defaults.cfg?

Comment 6 Michael Simacek 2014-12-12 14:21:26 UTC
(In reply to Richard Shaw from comment #5)
> It looks like that has to be done per chroot config file? I think I'll wait
> for the fix...
> 

you can do something like
sudo sed -i 's/^\[main\]$/&\nkeepcache=1/' /etc/mock/*.cfg

> That does bring up a good question though, it looks like the yum config
> option in [main] are more or less the same for all chroots. Is there a way
> to pull those options into site-defaults.cfg?

That's a good question. I'm not happy to say this, but currently there is no way. I'll try to come up with some solution to that, but it'll either involve parsing the config or splitting it into multiple configuration options that will be concatenated.

Comment 7 Miroslav Suchý 2014-12-12 15:54:27 UTC
Michael patch commited as 572751f. Thanks.

Comment 8 Fedora Update System 2015-01-16 09:56:48 UTC
mock-1.2.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc21

Comment 9 Fedora Update System 2015-01-16 09:57:24 UTC
mock-1.2.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.fc20

Comment 10 Fedora Update System 2015-01-16 10:01:10 UTC
mock-1.2.4-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.el7

Comment 11 Fedora Update System 2015-01-16 10:01:49 UTC
mock-1.2.4-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.4-1.el6

Comment 12 Fedora Update System 2015-01-16 19:10:30 UTC
Package mock-1.2.4-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.2.4-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0312/mock-1.2.4-1.el7
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2015-01-21 23:09:12 UTC
mock-1.2.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2015-01-27 03:04:41 UTC
mock-1.2.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2015-01-28 15:20:46 UTC
mock-1.2.5-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.el7

Comment 16 Fedora Update System 2015-01-28 15:21:58 UTC
mock-1.2.5-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.el6

Comment 17 Fedora Update System 2015-01-28 15:23:09 UTC
mock-1.2.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc20

Comment 18 Fedora Update System 2015-01-28 15:24:19 UTC
mock-1.2.5-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.5-1.fc21

Comment 19 Fedora Update System 2015-02-02 17:22:35 UTC
mock-1.2.5-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-02-03 04:42:34 UTC
mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6

Comment 21 Fedora Update System 2015-02-03 04:43:10 UTC
mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7

Comment 22 Fedora Update System 2015-02-03 04:43:32 UTC
mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20

Comment 23 Fedora Update System 2015-02-03 04:44:23 UTC
mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21

Comment 24 Fedora Update System 2015-02-09 05:29:40 UTC
mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2015-02-15 02:55:40 UTC
mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2015-02-20 00:33:03 UTC
mock-1.2.6-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2015-02-20 00:33:54 UTC
mock-1.2.6-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.