Bug 1759847 - command `dnf downgrade pkg` emits Error: No packages marked for downgrade
Summary: command `dnf downgrade pkg` emits Error: No packages marked for downgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Jan Blazek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-09 09:16 UTC by Yongcheng Yang
Modified: 2020-04-28 16:48 UTC (History)
4 users (show)

Fixed In Version: dnf-4.2.17-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:48:23 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1823 None None None 2020-04-28 16:48:54 UTC

Description Yongcheng Yang 2019-10-09 09:16:01 UTC
Description of problem:
Just noticed the command `dnf downgrade some_package` now emits error message.
I.e. Error: No packages marked for downgrade

I'm not sure if it's as expected or not.

Version-Release number of selected component (if applicable):
dnf-4.2.7-6.el8.noarch

How reproducible:
always

Steps to Reproduce:
1. dnf downgrade nfs-utils
2.
3.

Actual results:

[root@]# dnf downgrade nfs-utils
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:03:16 ago on Wed 09 Oct 2019 04:58:58 AM EDT.
Package nfs-utils of lowest version already installed, cannot downgrade it.
Error: No packages marked for downgrade.  <<<<<<<<<<<<
[root]# echo $?
1                                         <<<<<<<<<<<<
[root]# dnf upgrade -y nfs-utils
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:02:49 ago on Wed 09 Oct 2019 04:58:58 AM EDT.
Dependencies resolved.
Nothing to do.
Complete!
[root]# echo $?
0

Expected results:
Return "Nothing to do" but not the error message.

Additional info:
# in the rhel7
[root# rpm -q yum
yum-3.4.3-166.el7.noarch
[root]# yum downgrade rpcbind
Loaded plugins: product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

global name 'warnOrGiveUsageMessage' is not defined
Nothing to do
[root]# echo $?
0

Comment 1 Marek Blaha 2019-11-22 07:34:32 UTC
PR https://github.com/rpm-software-management/dnf/pull/1538 unifies exit codes of downgrade and upgrade commands. The behaviour is now also closer to yum3.

Comment 2 Marek Blaha 2019-11-22 08:31:05 UTC
PR with test: https://github.com/rpm-software-management/ci-dnf-stack/pull/700

Comment 5 Vratislav Hutsky 2020-01-08 09:02:10 UTC
Restoring previous qa_ack+ as agreed earlier.

Comment 9 errata-xmlrpc 2020-04-28 16:48:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1823


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