Bug 1464192 - rpm.RPMTRANS_FLAG_TEST prevents to save newly imported gpg key
Summary: rpm.RPMTRANS_FLAG_TEST prevents to save newly imported gpg key
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-22 15:35 UTC by Jaroslav Mracek
Modified: 2017-08-09 16:00 UTC (History)
6 users (show)

Fixed In Version: dnf-2.6.3-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-09 16:00:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Mracek 2017-06-22 15:35:38 UTC
Description of problem:
If we use rpm.RPMTRANS_FLAG_TEST in DNF then we can successfully import gpg key (result = self._ts.pgpImportPubkey(misc.procgpgkey(info.raw_key))), but key is not available for consequent package verification. This behavior is critical for  "dnf system-upgrade download --releasever=<n+1>".
Here is dnf code where we use it with work around:
https://github.com/rpm-software-management/dnf/pull/847

Version-Release number of selected component (if applicable):
dnf-2.5.1_1-13g89ab82b.fc25.noarch
rpm-4.13.0.1-1.fc25.x86_64

How reproducible:
Everytime - use dnf with --setopt=tsflags=test for transaction that requires import of gpg key. Key is imported but package verification fails.

Steps to Reproduce:
1. Remove gpg key required for mashine
2. Run "dnf install --setopt=tsflags=test <package>"
3. Transaction fails due failed gpg verification

Actual results:
Transaction fails due failed gpg verification

Expected results:
Transaction succeed

Additional info:

Comment 1 Panu Matilainen 2017-06-27 08:30:26 UTC
RPMTRANS_FLAG_TEST allows you to test whether importing a key would work or not - in other words this is an intentional feature.

If you need to ensure import then you need to set the flags accordingly.

Comment 2 Jaroslav Mracek 2017-06-27 15:58:01 UTC
Thanks Panu :-)

Comment 3 Jaroslav Mracek 2017-06-27 16:57:32 UTC
I created a pull-request that should help (https://github.com/rpm-software-management/dnf/pull/847)

Comment 4 Fedora Update System 2017-08-07 12:51:05 UTC
dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96

Comment 5 Fedora Update System 2017-08-08 01:24:40 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.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-4813633f96

Comment 6 Fedora Update System 2017-08-09 16:00:09 UTC
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.