Bug 1464192 - rpm.RPMTRANS_FLAG_TEST prevents to save newly imported gpg key
rpm.RPMTRANS_FLAG_TEST prevents to save newly imported gpg key
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
25
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Mracek
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-22 11:35 EDT by Jaroslav Mracek
Modified: 2017-08-09 12:00 EDT (History)
6 users (show)

See Also:
Fixed In Version: dnf-2.6.3-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-09 12:00:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jaroslav Mracek 2017-06-22 11:35:38 EDT
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 04:30:26 EDT
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 11:58:01 EDT
Thanks Panu :-)
Comment 3 Jaroslav Mracek 2017-06-27 12:57:32 EDT
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 08:51:05 EDT
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-07 21:24:40 EDT
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 12:00:09 EDT
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.