RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1680566 - cannot disable an alias
Summary: cannot disable an alias
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.0
Assignee: Pavla Kratochvilova
QA Contact: Jan Blazek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-25 10:30 UTC by Karel Srot
Modified: 2020-11-04 01:52 UTC (History)
3 users (show)

Fixed In Version: dnf-4.2.21-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:52:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Karel Srot 2019-02-25 10:30:56 UTC
Description of problem:

dnf man page says:

All  aliases  are  defined in configuration files in directory /etc/dnf/aliases.d/ in the [aliases] section, and aliases
       created by the alias command are located in the file USER.conf.  Optionally, there  is  a  section  [main]  with  option
       enabled  defaulting to True.

However that doesn't work.

# dnf alias add foo=reinstall
Aliases added: foo
# cat /etc/dnf/aliases.d/USER.conf
[main]
enabled = True

[aliases]
foo = reinstall
# sed -i 's/True/False/' /etc/dnf/aliases.d/USER.conf
# cat /etc/dnf/aliases.d/USER.conf
[main]
enabled = False

[aliases]
foo = reinstall

# dnf foo bash
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.
Repository beaker-client-testing is listed more than once in the configuration
Beaker Client - RedHatEnterpriseLinux7 - Testin 1.4 kB/s | 1.5 kB     00:01    
Beaker Client - RedHatEnterpriseLinux7           36 kB/s | 1.5 kB     00:00    
Beaker harness                                   32 kB/s | 1.3 kB     00:00    
QA Tools Incubator                               10 kB/s | 2.5 kB     00:00    
QA Tools Incubator Testing                       10 kB/s | 2.5 kB     00:00    
rhel                                            646 kB/s | 2.7 kB     00:00    
rhel-AppStream                                  411 kB/s | 2.8 kB     00:00    
Copr repo for standard-test-roles owned by aste 2.9 kB/s | 3.0 kB     00:01    
Dependencies resolved.
================================================================================
 Package        Arch             Version                   Repository      Size
================================================================================
Reinstalling:
 bash           x86_64           4.4.19-7.el8              rhel           1.5 M

Transaction Summary
================================================================================

Total download size: 1.5 M
Installed size: 6.6 M
Is this ok [y/N]: 

The above is incorrect, the alias is disabled and therefore dnf should report unknown command.

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

Comment 14 errata-xmlrpc 2020-11-04 01:52:20 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 (yum bug fix and enhancement update), 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/RHEA-2020:4510


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