Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1569908

Summary: decompress compressed files
Product: [Fedora] Fedora Reporter: Daniel Mach <dmach>
Component: libdnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: dmach, jmracek, mluscon, rdossant, rpm-software-management
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libdnf-0.26.0-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-21 02:56:54 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 Daniel Mach 2018-04-20 08:50:53 UTC
libdnf will need a way how to decompress files from repodata.

primary, filelists and others are handled by libsolv -> they are out of scope

We'll need to decompress modules.yaml[.gz] and possibly also comps
and handle them in libdnf by ourselves.

Existing DNF function lives here:
dnf / yum / misc.py / decompress()

I'm thinking about a class:
Decompressor(path)
  - toString() - return decompressed data
  - toFile(path) - write to a file
  - we may consider decompressing to a C++ stream, but I'd probably avoid doing it before it's needed

The new code probably belongs under libdnf/utils.

Comment 1 Igor Gnatenko 2018-04-20 13:44:35 UTC
No, it doesn't need this. Just use solv_xfopen() and it will handle everything for you.

Comment 2 Jan Kurik 2018-08-14 10:06:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 3 Daniel Mach 2018-12-12 13:43:12 UTC
I believe we have implemented this in this PR:
https://github.com/rpm-software-management/libdnf/pull/652

Comment 4 Fedora Update System 2019-02-18 10:15:21 UTC
libcomps-0.1.10-2.fc29 libdnf-0.26.0-1.fc29 dnf-plugins-core-4.0.4-1.fc29 dnf-plugins-extras-4.0.2-1.fc29 dnf-4.1.0-1.fc29 librepo-1.9.4-1.fc29 createrepo_c-0.12.1-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1fccede810

Comment 5 Fedora Update System 2019-02-19 06:27:21 UTC
createrepo_c-0.12.1-1.fc29, dnf-4.1.0-1.fc29, dnf-plugins-core-4.0.4-1.fc29, dnf-plugins-extras-4.0.2-1.fc29, libcomps-0.1.10-2.fc29, libdnf-0.26.0-1.fc29, librepo-1.9.4-1.fc29 has been pushed to the Fedora 29 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-2019-1fccede810

Comment 6 Fedora Update System 2019-02-21 02:56:54 UTC
createrepo_c-0.12.1-1.fc29, dnf-4.1.0-1.fc29, dnf-plugins-core-4.0.4-1.fc29, dnf-plugins-extras-4.0.2-1.fc29, libcomps-0.1.10-2.fc29, libdnf-0.26.0-1.fc29, librepo-1.9.4-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.