Bug 1380012

Summary: BZ2 files are not closed when done
Product: [Fedora] Fedora Reporter: Patrick Uiterwijk <puiterwijk>
Component: createrepo_cAssignee: Tomas Mlcoch <tmlcoch>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: tmlcoch
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: createrepo_c-0.10.0-15.fc26 createrepo_c-0.10.0-15.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-02 16:25:41 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:

Description Patrick Uiterwijk 2016-09-28 12:35:45 UTC
Description of problem:
Per bzip2 documentation: "BZ2_bzReadClose does not call fclose on the underlying file handle, so you should do that yourself if appropriate.".
createrepo_c does NOT do this.

Version-Release number of selected component (if applicable):
createrepo_c-0.10.0-5.fc24

How reproducible:
Consistent

Steps to Reproduce:
1. create a bz-compressed updateinfo.xml.bz2 file
2. Open a python interpreter, in which you run the underlying code, and you keep it open afterwards
3. Do an lsof of updateinfo.xml.bz2

Actual results:
python 6099 docker 3r REG 253,2 615038 105878032 updateinfo.xml.bz2

Expected results:
No output from lsof

Additional info:
Patch at https://github.com/rpm-software-management/createrepo_c/pull/66

Code:
import createrepo_c as cr
cr.UpdateInfo('updateinfo.xml.bz2')

Comment 1 Tomas Mlcoch 2016-09-29 06:50:15 UTC
Merged into upstream

Comment 2 Fedora End Of Life 2017-02-28 10:22:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Fedora Update System 2017-12-22 03:16:20 UTC
createrepo_c-0.10.0-15.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-abd7416fe7

Comment 4 Fedora Update System 2017-12-22 03:16:27 UTC
createrepo_c-0.10.0-15.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-01a1365903

Comment 5 Fedora Update System 2017-12-22 12:43:09 UTC
createrepo_c-0.10.0-15.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-abd7416fe7

Comment 6 Fedora Update System 2017-12-22 13:15:59 UTC
createrepo_c-0.10.0-15.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-01a1365903

Comment 7 Fedora Update System 2018-01-02 16:25:41 UTC
createrepo_c-0.10.0-15.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-01-02 16:52:49 UTC
createrepo_c-0.10.0-15.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.