Bug 1321490

Summary: dnf history undo gives misleading error message when privileges are missing
Product: [Fedora] Fedora Reporter: Zbigniew JÄ™drzejewski-Szmek <zbyszek>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 23CC: akasurde, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame, wareagle352
Target Milestone: ---Keywords: EasyFix, Triaged, UserExperience
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-08 06:38:22 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 Zbigniew Jędrzejewski-Szmek 2016-03-28 01:13:50 UTC
Description of problem:
When running 'dnf history undo XXX' as normal user, dnf says that this ID is missing, but actually the user does not have privileges to access history list.


$ dnf history undo 548
Last metadata expiration check: 0:00:41 ago on Sun Mar 27 21:08:52 2016.
Not found given transaction ID
Error: Failed history undo
$ sudo dnf history undo 548
Last metadata expiration check: 1:06:53 ago on Sun Mar 27 20:03:20 2016.
Undoing transaction 548, from Sun Mar 27 17:42:47 2016
...
Is this ok [y/N]: 

Version-Release number of selected component (if applicable):
dnf-1.1.7-2.fc23.noarch

Expected results:
"You don't have access to the history DB."

Comment 1 William Skinner 2016-03-28 04:08:44 UTC
Was able to reproduce the bug. We need to make sure that the script is checking for root privileges at the beginning. Marked EasyFix as this should be a relatively straightforward fix.

Comment 2 Honza Silhan 2016-03-31 13:19:45 UTC
thx, Will. well triaged

Comment 3 Fedora Admin XMLRPC Client 2016-07-08 09:38:41 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Abhijeet Kasurde 2016-09-08 04:08:10 UTC
I think this PR will solves this issue - https://github.com/rpm-software-management/dnf/pull/596

Comment 5 Igor Gnatenko 2016-09-08 06:38:22 UTC

*** This bug has been marked as a duplicate of bug 1230355 ***