Bug 1165716
Summary: | mock must *not* automatically update packages in build root | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> |
Component: | mock | Assignee: | Miroslav Suchý <msuchy> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | jdisnard, mebrown, mizdebsk, msimacek, msuchy, praiskup, williams |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | mock-1.2.3-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-12-12 04:07:27 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
Vít Ondruch
2014-11-19 14:29:32 UTC
This is the offending patch: ae79fb5bed79946b84871dc204fc0e6c8cb17cea Just FTR, I tried to use --disablerepo=* to workaround the issues, and of course mock fails with error: Start: yum update There are no enabled repos. Run "yum repolist all" to see the repos you have. You can enable repos with yum-config-manager --enable <repo> ERROR: Exception(ruby-2.1.5-24.fc22.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/yum --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releasever 22 --disablerepo * update --setopt=tsflags=nocontexts This is wrong as well. You can use --offline to prevent packages from being updated. 'yum update' was presented in previous mock as well. And on exactly the same place. So this is no regression. Additionally this is configurable in site-default.cfg by setting: config_opts['update_before_build'] = False or, as Mikolaj said, by using --offline. (In reply to Miroslav Suchý from comment #4) > 'yum update' was presented in previous mock as well. And on exactly the same > place. So this is no regression. This is not true IMO. 1) The behavior I described never happened before. 2) Checking 1.1.41, the update was run under this condition: https://git.fedorahosted.org/cgit/mock.git/tree/py/mockbuild/backend.py?id=mock-1.1.41#n453 and if go further, you'll see that the condition was never true for not cleaned chroot. https://git.fedorahosted.org/cgit/mock.git/tree/py/mockbuild/plugins/root_cache.py?id=mock-1.1.41#n105 Other reason why this happens might be enabled LVM plugin, not sure ... > Additionally this is configurable in site-default.cfg by setting: > config_opts['update_before_build'] = False Luckily it is and it should be disabled by default. It should never update. I can't imagine building package several times with --no-clean option and suddenly it starts failing due to some update which lands in the mean time. Moreover, it just delays the build. > or, as Mikolaj said, by using --offline. Thanks for the tip, I'll try it ... (In reply to Vít Ondruch from comment #5) > (In reply to Miroslav Suchý from comment #4) > > 'yum update' was presented in previous mock as well. And on exactly the same > > place. So this is no regression. > > This is not true IMO. > > 1) The behavior I described never happened before. It definitely happened with mock 1.1.x. I am sure because I used to use private build of mock with this "feature" removed: https://github.com/mizdebsk/mock/commit/7ab92f6538b5e441d74f7fa3b56fc37e4d7ce711 > > or, as Mikolaj said, by using --offline. > > Thanks for the tip, I'll try it ... I might be wrong, but as I understand, in mock 1.1.x or 1.2.x with --offline will prevent mock from downloading any new dependencies. However if you configure mock to use dnf, --offline prevents running "dnf update" and refreshing metadata, but it doesn't prevent mock from downloading and installing new dependencies. This is exactly what I personally need and expect. Vit is right, it didn't happen before when --no-clean was specified. Mikolaj is probably talking about updating without --no-clean which stayed the same. The code is similar, but previous versions of mock didn't execute it at all with --no-clean. Now initialize function is executed for all buildroot modifying actions in order to minimize code duplication and enable things like automatic initialization, LVM, mock shell accessible during build, etc. So this is a regression. Sent a patch upstream. In the meantime, you can use config_opts['update_before_build'] = False as a workaround for this (it will disable yum update for builds regardless of clean/no-clean) Commited as 9085831 mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc21 mock-1.2.3-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc20 mock-1.2.3-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.3-1.el7 mock-1.2.3-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.3-1.el6 Package mock-1.2.3-1.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mock-1.2.3-1.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-16285/mock-1.2.3-1.fc21 then log in and leave karma (feedback). mock-1.2.3-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.3-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. mock-1.2.3-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. mock-1.2.3-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. |