Bug 921298 - dnf install should fallback to case insensitive matching if case sensitive matching fails
Summary: dnf install should fallback to case insensitive matching if case sensitive ma...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 33
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 23:36 UTC by Thomas Perl
Modified: 2020-11-19 18:03 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-07-20 08:52:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Make "yum install" partially case-insensitive. (1.94 KB, patch)
2013-03-14 10:22 UTC, Zdeněk Pavlas
no flags Details | Diff

Description Thomas Perl 2013-03-13 23:36:22 UTC
Description of problem:

"yum install" only installs packages if the case exactly matches.

Steps to Reproduce:
1. Search for "x11 devel", see "libX11-devel"
2. Type "yum install libx11-devel"
  
Actual results:

Can't install package (not found). Need to type "yum install libX11-devel" (note uppercase "X") to install the package successfully.

Expected results:

1. yum first tries to match the exact case
2. If no exact case match is found, yum does a case insensitive match
3. If a case insensitive match is found, yum interactively asks me to install it


Additional info:

I'm not the first one experiencing this issue. Here's a selection of relevant mailing list threads about this issue (I'm surprised that a bug for this doesn't exist yet, but maybe I just used the wrong search terms here):

2007: http://www.redhat.com/archives/rhl-devel-list/2007-November/msg02178.html
2008:
http://www.redhat.com/archives/fedora-packaging/2008-July/msg00102.html
2011: http://fedora.12.n6.nabble.com/Any-arguments-for-keeping-Yum-case-sensitive-td2465433.html

Comment 1 Thomas Perl 2013-03-13 23:57:44 UTC
Just to clarify from re-reading the mailing list thread arguments:

 - I don't expect a technical perfect implementation for every character set
 - I'm only expecting the ASCII characters A-Z to be treated as a-z
 - Only if there is NO exact case match and a SINGLE case insensitive match
 - If need be, only if ALL (ASCII) characters in the command line are lowercase
   (e.g. if I type "yum install LIBx11-devel", it can fail)
 - Yum can interactively ask me to confirm if this is what I want to do
 - If Yum is not run interactively, it doesn't need to provide this behavior
 - If there is a non-ASCII character in the package name to be installed, this
   behavior also doesn't have to work

Comment 2 Zdeněk Pavlas 2013-03-14 10:22:15 UTC
Created attachment 709969 [details]
Make "yum install" partially case-insensitive.

Comment 3 Fedora End Of Life 2013-12-21 12:07:54 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2014-02-05 19:56:53 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Thomas Perl 2014-02-06 11:28:10 UTC
Reopening, still an issue in Fedora 20.

Comment 6 Fedora End Of Life 2015-05-29 08:55:12 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Thomas Perl 2015-05-29 09:24:53 UTC
Still an issue in Fedora 22.

Comment 8 Honza Silhan 2015-07-20 08:52:17 UTC
We don't want to support that in DNF. The package name should and is unique. You can search for the package in list and search command case insensitively.

Comment 9 Turgut Kalfaoglu 2019-02-07 06:03:16 UTC
There should at least be an option in dnf.conf to provide case insensitivity feature.
I was burned several times because of this issue.

Comment 10 Garrett LeSage 2020-11-19 17:29:55 UTC
Having hit this case sensitivity issue several times over the years, I decided to finally file a bug about it. Of course, it already exists as here, so I'm not filing a duplicate.


> We don't want to support that in DNF.

Why? What's the reason?


Currently dnf/yum is a bit user-hostle by _knowing_ what the user meant, but not providing a way for the computer to fix it.

When doing user research (as a UI/UX designer), we often start sessions saying that when something software does is unexpected, it's likely that the computer is in the wrong, not the person using the computer. I think that applies here, especially considering this problem coming up in multiple forums and mailing lists over the years.

As it stands, the computer taunts the user with the correct answer _that it knows_ and then expects the user to redo everything exactly, except with the exact case that dnf/yum mentions. This is extra busywork for humans and something the computer can easily perform.

Ideally, dnf/yum would fix the problem and either run with the corrected package name (especially in the cases where there's only 1 possible match) or at least have a confirmation prompt with the corrected package (if there might even be two packages with similar names but with different cases... but I doubt case-clashing packages even exist).


(FWIW: I've heard this same complaint from community folks using Fedora & CentOS as well as Red Hat customers. It's minor in the grand scheme of things, but it's one of those small "papercuts" that adds up.)

Comment 11 Garrett LeSage 2020-11-19 18:03:10 UTC
Here's a design-related article talking about taking input from the user and interpreting what they meant: http://ui-patterns.com/patterns/ForgivingFormat

Excerpt:

> ## Solution
> 
> Allow users to enter text in their own format and syntax, and let the system interpret it intelligently
>
> Let users focus on getting things done rather than typing in things correctly. Lower the barrier for users to interact by allowing a broad spectrum of formats and syntaxes to be inputted. Consider nudging users to provide more easily interpreted information by paying attention to how you ask for input.
>
> Transfer the problem inputting data from a user interface problem to a programming problem. Behind the scenes, an interpreter checks for different word patterns, and converts them into a formatted value.

> ## Rationale
>
> Using the forgiving format pattern saves space and decreases the barrier for the user to interact with the system.


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