Bug 1278969 - dnf assumes 'n' on key import dialog when using sudo
dnf assumes 'n' on key import dialog when using sudo
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
23
All Linux
unspecified Severity urgent
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
https://fedoraproject.org/wiki/Common...
: Reopened
Depends On: 1066044
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-06 16:49 EST by Will Woods
Modified: 2015-11-09 08:44 EST (History)
19 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1066044
Environment:
Last Closed: 2015-11-09 08:44:20 EST
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 Will Woods 2015-11-06 16:49:25 EST
+++ This bug was initially created as a clone of Bug #1066044 +++

--- Additional comment from James (purpleidea) on 2015-11-04 01:52:45 EST ---

I can confirm I just experienced this in Fedora 22, when trying to upgrade to Fedora 23:

james@computer:~$ sudo dnf system-upgrade download --releasever=23 --allowerasing

(5489/5489): libreoffice-core-5.0.3.1-1.fc23.x8 141 kB/s |  74 MB     08:56
--------------------------------------------------------------------------------
Total                                           868 kB/s | 2.6 GB     53:19
warning: /var/lib/dnf/system-upgrade/efivar-libs-0.21-1.fc23.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 34ec9cba: NOKEY
Importing GPG key 0x34EC9CBA:
 Userid     : "Fedora (23) <fedora-23-primary@fedoraproject.org>"
 Fingerprint: EF45 5106 80FB 0232 6B04 5AFB 3247 4CF8 34EC 9CBA
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-x86_64
Is this ok [y/N]: The downloaded packages were saved in cache till the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Didn't install any keys
james@computer:~$ sudo rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-23-x86_64

I manually ran this import command to fix the issue.

--- Additional comment from awilliam@redhat.com on 2015-11-04 02:55:19 EST ---

er...it doesn't look like you answered 'y' to the question whether you wanted to import the key.

--- Additional comment from James (purpleidea) on 2015-11-04 04:15:38 EST ---

(In reply to awilliam@redhat.com from comment #15)
> er...it doesn't look like you answered 'y' to the question whether you
> wanted to import the key.

I had the same thought, however it never prompted me, the script just exited. Either that or it had a very short timeout and I missed it somehow.

--- Additional comment from awilliam@redhat.com on 2015-11-04 12:26:31 EST ---

When you run dnf in some sort of non-interactive way it by default answers 'no' to all questions, you can pass '-y' to make it answer 'yes'. Possibly this is happening when you run through sudo, is my only guess? I think I usually run the dnf command directly as root, not sure about other testers.
Comment 1 James (purpleidea) 2015-11-06 17:24:34 EST
Can someone else confirm this and make sure it isn't just a timeout?
Yum didn't have this problem, everyone runs it with sudo.
Comment 2 Jaroslav Mracek 2015-11-09 08:44:20 EST
We cannot reproduce. When we upgraded, there were request for import gpg key. y/N and it waits until options were chosen. Incidental enter hit chose N option.
Please if you will provide a reproducer, feel free to open bug again.

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