Bug 740327

Summary: [PATCH] mock 1.1.14 / SELinux plugin uses Python 2.5 syntax, which causes breakage on RHEL5
Product: [Fedora] Fedora Reporter: Yury V. Zaytsev <yury>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
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:01:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Use try / finally instead of 'with' statement in the SELinux plugin none

Description Yury V. Zaytsev 2011-09-21 16:20:54 UTC
Description of problem:

The 'with' statement and context managers only appeared in Python 2.5. RHEL5 ships Python 2.4, so using Python 2.5+ syntax breaks mock on RHEL5, unless the SELinux plugin is disabled.

Version-Release number of selected component (if applicable):

mock 1.1.14

Additional info:

Attached patch reverts to pre-Python 2.5 way of handling open files in Python and hence fixes the aforementioned issue.

Comment 1 Yury V. Zaytsev 2011-09-21 16:22:14 UTC
Created attachment 524240 [details]
Use try / finally instead of 'with' statement in the SELinux plugin

Please apply!

Thanks,
Z.

Comment 2 Clark Williams 2011-09-21 16:33:27 UTC
queued for next release of mock

Comment 3 Fedora Update System 2011-09-23 20:55:22 UTC
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

Comment 4 Fedora Update System 2011-09-23 20:56:23 UTC
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

Comment 5 Fedora Update System 2011-09-23 20:57:19 UTC
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

Comment 6 Fedora Update System 2011-09-23 20:58:09 UTC
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

Comment 7 Fedora Update System 2011-09-24 21:59:36 UTC
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).

Comment 8 Fedora Update System 2011-10-02 22:59:54 UTC
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.

Comment 9 Fedora Update System 2011-10-02 23:08:17 UTC
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.

Comment 10 Fedora Update System 2011-10-16 18:27:54 UTC
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.

Comment 11 Fedora Update System 2011-10-16 18:29:40 UTC
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.