Bug 1811461

Summary: DNF default search output should be sorted alphanumerically
Product: [Fedora] Fedora Reporter: Luke Jones <luke>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 32CC: aruiz, dmach, jmracek, jrohel, mblaha, mhatina, molasaga, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-22 04:29:41 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 Luke Jones 2020-03-08 22:54:58 UTC
Description of problem:

The default search sorting tends to produce output that is arranged by line length. This makes it very hard to easily and quickly scan the output.

For example if you were expecting a package with a <name>-postfix to logically follow on the next line after the <name>, you might find it halfway down the list from <name>

A contrived example would be searching for "rust" expecting that all "rust" packages be grouped, in order to find a package you know is named "rust-" but are unsure of the postfix and expect the postfix might describe the required package or provide an easily digested hint:


============ Name & Summary Matched: rust ============
rust.x86_64 : The Rust Programming Language
rust-doc.x86_64 : Documentation for Rust
rust-gdb.noarch : GDB pretty printers for Rust
rust-lldb.noarch : LLDB pretty printers for Rust
rust-std-static.i686 : Standard library for Rust
rust-std-static.x86_64 : Standard library for Rust
python3-rust2rpm.x86_64 : Convert Rust packages to RPM
p11-kit-trust.x86_64 : System trust module from p11-kit
rust-src.noarch : Sources for the Rust standard library
p11-kit-trust.i686 : System trust module from p11-kit
python3-rustcfg-tests.noarch : Tests for python3-rustcfg
rustfmt.x86_64 : Tool to find and fix Rust formatting issues
python3-rustcfg.noarch : Rust cfg expression parser in python
rust-srpm-macros.noarch : RPM macros for building Rust source packages
rust-debugger-common.noarch : Common debugger pretty printers for Rust
rust-analysis.x86_64 : Compiler analysis data for the Rust standard library
perl-Module-Install-TrustMetaYml.noarch : Trusts META.yml list of dependencies
rust-packaging.x86_64 : RPM macros for building Rust packages on various architectures


In this case "rust-analysis" may have been the desired package. Searching for a python package perhaps, this issue is exacerbated a great deal. 


Expected results:

Do not break expected UX. The usual output sorting for a CLI tool of most sorts, is to output sorted alphanumerically by default unless the user specifies otherwise.

DNF should not attempt to provide a default behaviour that is contrary to established and expected UX. Or at the very least there should be a CLI switch option or config setting to select the required search output behaviour.

Comment 1 Alberto Ruiz 2020-03-08 23:09:42 UTC
+1

Comment 2 Daniel Mach 2020-05-22 04:29:41 UTC

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