Bug 738052
Summary: | mock 1.1.14 rpmdb unlink fails to work | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Florian La Roche <florian.laroche> |
Component: | mock | Assignee: | Clark Williams <williams> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | el6 | CC: | fabrice, fedora, mebrown, williams |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | mock-1.1.15-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-10-02 23:00:53 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Florian La Roche
2011-09-13 18:16:39 UTC
(In reply to comment #0) > Description of problem: > seems like becomeUser() is already called before unlinking the rpmdb files: Florian, I haven't seen the problem in my testing but that's probably just differences in host/environment. Please try the below and see if it fixes your issue. diff --git a/py/mockbuild/backend.py b/py/mockbuild/backend.py index 7186c7d..fffcf0c 100644 --- a/py/mockbuild/backend.py +++ b/py/mockbuild/backend.py @@ -535,6 +535,14 @@ class Root(object): try: self._setupDev() self._mountall() + + # remove rpm db files to prevent version mismatch problems + # note: moved to do this before the user change below! + for tmp in glob.glob(self.makeChrootPath('var/lib/rpm/__db*')): + os.unlink(tmp) + + + # drop privs and become mock user self.uidManager.becomeUser(self.chrootuid, self.chrootgid) self.state("setup") @@ -549,10 +557,6 @@ class Root(object): gid=self.chrootgid, ) - # remove rpm db files to prevent version mismatch problems - for tmp in glob.glob(self.makeChrootPath('var/lib/rpm/__db*')): - os.unlink(tmp) - # rebuild srpm/rpm from SPEC file specs = glob.glob(self.makeChrootPath(self.builddir, "SPECS", "*.sp if len(specs) < 1: mock-1.1.15-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/mock-1.1.15-1.fc15 mock-1.1.15-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.1.15-1.el6 mock-1.0.22-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/mock-1.0.22-1.el5 mock-1.1.15-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/mock-1.1.15-1.fc14 Package mock-1.1.15-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.15-1.el6' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/mock-1.1.15-1.el6 then log in and leave karma (feedback). mock-1.1.15-1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. mock-1.1.15-1.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. 1.1.15 works fine so far, no problems showing up Thanks, Florian La Roche mock-1.0.22-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. mock-1.1.15-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. |