Bug 1656314

Summary: [RFE] Downloading additional metadata from repository via "context" API
Product: Red Hat Enterprise Linux 8 Reporter: Jaroslav Rohel <jrohel>
Component: libdnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Blaha <mblaha>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.0CC: dmach, jberan, jhnidek, jmracek, jrohel, jsefler, mblaha, mdomonko, mkolaja, wchadwic
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libdnf-0.22.5-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 01:42: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 Jaroslav Rohel 2018-12-05 08:48:36 UTC
Newly created libdnf plugins require to download additional metadata files from repositories.

Similar functionality is already used by DNF plugins (Python). So public API was created in PR https://github.com/rpm-software-management/libdnf/pull/635 as reaction to BZ https://bugzilla.redhat.com/show_bug.cgi?id=1651468 . 

This is request for similar functionality in the "context" part of libdnf. It is needed for libdnf plugins (and microdnf, PackageKit, ...).
The requested functionality will also solve the request for decompression of downloaded files https://bugzilla.redhat.com/show_bug.cgi?id=1640220 .

Comment 1 Jaroslav Rohel 2018-12-05 10:13:40 UTC
PR https://github.com/rpm-software-management/libdnf/pull/652

Comment 2 Jaroslav Rohel 2018-12-05 11:10:08 UTC
*** Bug 1640220 has been marked as a duplicate of this bug. ***

Comment 4 Karel Srot 2018-12-12 14:07:45 UTC
Jardo,
do you have by any chance example of such plugin that we could incorporate into a test case?

Comment 6 Daniel Mach 2018-12-13 08:11:31 UTC
Scenario for the test case (what productid plugin does actually):
* create a repo with 'productid' certificate attached as 'productid' metadata type
* plugin registers 'productid' metadata type for download -> it's present on downloading the repo
* plugin can obtain path to the productid file in repo cache
* plugin can read uncompressed content of the productid file

Comment 8 Daniel Mach 2018-12-13 14:38:15 UTC
Requesting blocker+ because this is a requirement from the Subscription Manager team
and the feature is essential for rhsm plugin to work properly with productid.

If this doesn't get implemented, PackageKit and microdnf won't be able to work with subscriptions correctly.

Comment 9 Whitney Chadwick 2018-12-17 22:07:15 UTC
Set blocker+ per RHEL 8 blocker approval team

Comment 12 Karel Srot 2019-02-05 10:03:18 UTC
Hi John,
could you please comment whether the added feature works fine for subscription-manager or not? Do you have any relevant test results eventually?

Comment 13 Jiri Hnidek 2019-02-06 13:03:48 UTC
Hi Karel,
I have created PR for subscription-manager (our libdnf product-id plugin) usingnew API: https://github.com/candlepin/subscription-manager/pull/2025

Comment 16 Red Hat Bugzilla 2023-09-14 04:43:20 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days