Warum sortiert Fedoras DNF Zeilen nach Länge?

0

Wenn ich a mache dnf search emacs, scheint die Ausgabe nach Zeilenlänge sortiert zu sein (siehe unten).

Warum?

[dhc-user@server1 timestudy]$ dnf search emacs
Last metadata expiration check: 2 days, 8:25:38 ago on Sun May  1 17:14:42 2016.
===================================================== N/S Matched: emacs =====================================================
emacs.x86_64 : GNU Emacs text editor
emacs-vm.x86_64 : Emacs VM mail reader
ucblogo-emacs.x86_64 : Emacs Logo mode
emacs-common.x86_64 : Emacs common files
emacspeak.x86_64 : Emacs Speech interface
ocaml-emacs.x86_64 : Emacs mode for OCaml
emacs-pydb.noarch : Pydb support for Emacs
xemacs.i686 : Different version of Emacs
xemacs.x86_64 : Different version of Emacs
emacs-ledger.x86_64 : Emacs mode for ledger
emacs-apel.noarch : A Portable Emacs Library
emacs-mew.x86_64 : Email client for GNU Emacs
emacs-sdcc.x86_64 : Emacs extensions for SDCC
emacs-cdargs.noarch : Cdargs support for Emacs
emacs-irsim-mode.noarch : Irsim mode for emacs
migemo-emacs.noarch : Emacs front-end of Migemo
emacs-lua.noarch : Lua major mode for GNU Emacs
Singular-emacs.x86_64 : Emacs mode for Singular
cvc3-emacs.noarch : Compiled Emacs mode for CVC3
emacs-filesystem.noarch : Emacs filesystem layout
emacs-color-theme.noarch : Color themes for Emacs
emacs-pyrex.noarch : Pyrex editing mode for Emacs
migemo-xemacs.noarch : XEmacs front-end of Migemo
emacs-evil.noarch : Extensible vi layer for Emacs
emacs-notmuch.noarch : Not much support for Emacs
cvc3-xemacs.noarch : Compiled XEmacs mode for CVC3
emacs-global.noarch : GNU GLOBAL support for Emacs
emacs-spice-mode.noarch : SPICE Mode for GNU Emacs
emacs-verilog-mode.noarch : Verilog mode for Emacs
xemacs-devel.i686 : Development files for XEmacs
xemacs-devel.x86_64 : Development files for XEmacs
emacs-auctex.noarch : Enhanced TeX modes for Emacs
emacs-common-w3m.noarch : W3m interface for Emacsen
xemacs-filesystem.noarch : XEmacs filesystem layout
emacs-goodies.noarch : Miscellaneous add on for Emacs
mona-emacs.noarch : Emacs mode for editing Mona files
xemacs-el.x86_64 : Emacs lisp source files for XEmacs
why3-emacs.noarch : Emacs support file for why3 files
gcl-emacs.noarch : Emacs mode for interacting with GCL
undertaker-emacs.noarch : Emacs support for undertaker
emacs-ledger-el.noarch : Emacs elisp source for ledger
mona-xemacs.noarch : XEmacs mode for editing Mona files
why3-xemacs.noarch : XEmacs support file for why3 files
emacs-rinari.noarch : Ruby on rails minor mode for Emacs
gcl-xemacs.noarch : XEmacs mode for interacting with GCL
undertaker-xemacs.noarch : XEmacs support for undertaker
emacs-gnu-smalltalk.noarch : Emacs mode for GNU Smalltalk
why3-emacs-el.noarch : Emacs source file for why3 support
xemacs-pysmell.noarch : Python automcompletion for XEmacs
frama-c-emacs.noarch : Emacs support file for ACSL markup
emacs-haskell-mode.noarch : Haskell editing mode for Emacs
emacs-nox.x86_64 : GNU Emacs text editor without X support
emacs-slime-el.noarch : Elisp source files for emacs-slime
emacs-pysmell.noarch : Python automcompletion for GNU Emacs
frama-c-emacs-el.noarch : Emacs source file for ACSL markup
why3-xemacs-el.noarch : XEmacs source file for why3 support
xemacs-packages-base.noarch : Base lisp packages for XEmacs
frama-c-xemacs.noarch : XEmacs support file for ACSL markup
emacs-pymacs.noarch : Emacs and Python integration framework
emacs-rinari-el.noarch : Elisp source files for emacs-rinari
frama-c-xemacs-el.noarch : XEmacs source file for ACSL markup
clips-emacs.noarch : EMACS add-ons for the CLIPS expert system
emacs-goodies-el.noarch : Elisp source files for Emacs-goodies
emacs-ess-doc.noarch : Documentation of Emacs Speaks Statistics
xemacs-info.noarch : XEmacs documentation in GNU texinfo format
emacs-mmm-el.noarch : Elisp source files for mmm under GNU Emacs
xemacs-ebib-el.noarch : Elisp source files for Ebib under XEmacs
emacs-yaml-mode.noarch : Major mode to edit YAML files for emacs
cvc3-emacs-el.noarch : Elisp source files for the CVC3 Emacs mode
xemacs-packages-extra.noarch : Collection of XEmacs lisp packages
emacs-php-mode.noarch : Major GNU Emacs mode for editing PHP code
emacs-slime.noarch : The superior lisp interaction mode for emacs
emacs-ebib-el.noarch : Elisp source files for Ebib under GNU Emacs
emacs-nesc-el.noarch : Elisp source files for nesC under GNU Emacs
xemacs-ebib.noarch : Compiled elisp files to run Ebib under XEmacs
pinentry-emacs.x86_64 : Passphrase/PIN entry dialog based on emacs
cvc3-xemacs-el.noarch : Elisp source files for the CVC3 XEmacs mode
emacs-bbdb.noarch : A contact management utility for use with Emacs
emacs-htmlize-el.noarch : Emacs Lisp source files for emacs-htmlize
emacs-terminal.noarch : A desktop menu item for GNU Emacs terminal.
coq-emacs.noarch : GNU Emacs support for Coq proof management system
emacs-common-tuareg.noarch : Emacs and XEmacs mode for editing ocaml
emacs-ebib.noarch : Compiled elisp files to run Ebib under GNU Emacs
emacs-magit-el.noarch : Elisp source files for Magit under GNU Emacs
emacs-nesc.noarch : Compiled elisp files to run nesC under GNU Emacs
gcl-emacs-el.noarch : Source for Emacs mode for interacting with GCL
undertaker-emacs-el.noarch : Source for Emacs support for undertaker
xemacs-riece.noarch : Compiled elisp files to run Riece under XEmacs
emacs-epix.noarch : Compiled elisp files to run epix under GNU Emacs
emacs-erlang-lfe.noarch : Emacs major mode for Lisp Flavoured Erlang
emacs-gettext.noarch : Support for editing po files within GNU Emacs
emacs-magit.noarch : Emacs interface to the most common Git operations
emacs-pymacs-el.noarch : Elisp source files for pymacs under GNU Emacs
emacs-riece.noarch : Compiled elisp files to run Riece under GNU Emacs
gcl-xemacs-el.noarch : Source for XEmacs mode for interacting with GCL
tmda-emacs.noarch : Tagged Message Deliver Agent - Emacs Support Files
undertaker-xemacs-el.noarch : Source for XEmacs support for undertaker
xemacs-w3m.noarch : Compiled elisp files to run Emacs-w3m Under XEmacs
emacs-common-riece.noarch : Yet Another IRC Client for Emacs and XEmacs
emacs-ess.noarch : Files to run Emacs Speaks Statistics under GNU Emacs
emacs-cdargs-el.noarch : Elisp source files for Cdargs support for Emacs
emacs-w3m.noarch : Compiled elisp files to run Emacs-w3m under GNU Emacs
xemacs-erlang.noarch : Compiled elisp files for erlang-mode under XEmacs
emacs-dinotrace.x86_64 : Elisp source files for dinotrace under GNU Emacs
emacs-gnu-smalltalk-el.noarch : ELisp source files for emacs-gnu-smaltalk
flim-xemacs.noarch : Basic library for handling email messages for XEmacs
xemacs-erlang-el.noarch : Elisp source files for erlang-mode under XEmacs
emacs-common-ess.noarch : Emacs Speaks Statistics add-on package for Emacs
emacs-erlang.noarch : Compiled elisp files for erlang-mode under GNU Emacs
emacs-goto-chg.noarch : Emacs add-on to go to last change in current buffer
emacs-lua-el.noarch : Elisp source files for Lua major mode under GNU Emacs
protobuf-emacs.x86_64 : Emacs mode for Google Protocol Buffers descriptions
python-ropemacs.noarch : Plugin for performing python refactorings in emacs
xemacs-tuareg.noarch : Compiled elisp files to run Tuareg-mode under XEmacs
emacs-erlang-el.noarch : Elisp source files for erlang-mode under GNU Emacs
emacs-global-el.noarch : Elisp source files for GNU GLOBAL support for Emacs
emacs-rpm-spec-mode.noarch : Major GNU Emacs mode for editing RPM spec files
protobuf-emacs-el.x86_64 : Elisp source files for Google protobuf Emacs mode
xemacs-ddskk.noarch : Compiled elisp files to run Daredevil SKK under XEmacs
emacs-lookup.noarch : Search Interface with Electronic Dictionaries for Emacs
emacs-tuareg.noarch : Compiled elisp files to run Tuareg-mode under GNU Emacs
emacs-auto-complete.noarch : Intelligent auto-complete extension for GNU Emacs
emacs-ddskk.noarch : Compiled elisp files to run Daredevil SKK under GNU Emacs
emacs-irsim-mode-el.noarch : Source files for Emacs-irsim-mode under GNU Emacs
emacs-spice-mode-el.noarch : Source files for Emacs-spice-mode under GNU Emacs
emacs-vregs-mode.noarch : Elisp source files for systemc-vregs under GNU Emacs
xemacs-nox.x86_64 : Different version of Emacs built without X Windows support
emacs-systemc-mode.x86_64 : Elisp source files for systemc-mode under GNU Emacs
xemacs-xft.x86_64 : Different version of Emacs built with Xft/fontconfig support
xemacs-common.x86_64 : Byte-compiled lisp files and other common files for XEmacs
emacs-common-ebib.noarch : A BibTeX database manager that runs in Emacs and XEmacs
emacs-haskell-mode-el.noarch : Elisp source files for Haskell-mode under GNU Emacs
emacs-mmm.noarch : Emacs minor mode allowing different major modes in the same file
emacs-proofgeneral-el.noarch : Elisp source files for Proof General under GNU Emacs
emacs-proofgeneral.noarch : Compiled elisp files to run Proof General under GNU Emacs
emacs-color-theme-el.noarch : Elisp source files for Emacs Color Themes under GNU Emacs
xemacs-packages-extra-info.noarch : XEmacs packages documentation in GNU texinfo format
xemacs-packages-extra-el.noarch : Emacs lisp source files for XEmacs packages collection
emacs-auto-complete-el.noarch : Elisp source files for Auto Complete Mode under GNU Emacs
emacs-erlang-lfe-el.noarch : Elisp source files for Lisp Flavoured Erlang under GNU Emacs
emacs-common-ddskk.noarch : Daredevil SKK - Simple Kana to Kanji conversion program for Emacs
xemacs-packages-base-el.noarch : Emacs lisp source files for the base lisp packages for XEmacs
emacs-common-proofgeneral.noarch : Emacs mode for standard interaction interface for proof assistants
coq-emacs-el.noarch : Elisp source files for Coq proof management system
emacs-gtypist.x86_64 : GNU typing tutor
emacs-htmlize.noarch : Convert buffer text and decorations to HTML
emacs-undo-tree.noarch : Treats undo history as a tree of changes
emacs-auctex-doc.noarch : Documentation in various formats for AUCTeX
vile.x86_64 : VI Like Emacs
xvile.x86_64 : VI Like Emacs
zile.x86_64 : Zile Is Lossy Emacs
mg.x86_64 : Tiny Emacs-like editor
jove.x86_64 : Jonathan's Own Version of Emacs
ctags-etags.x86_64 : Exuberant Ctags for emacs tag format
psgml.noarch : GNU Emacs major mode for editing SGML documents
flim.noarch : Basic library for handling email messages for Emacs
e3.x86_64 : Text editor with key bindings similar to WordStar, Emacs, pico, nedit, or vi
[dhc-user@server1 timestudy]$ 
vy32
quelle

Antworten:

2

Dies scheint nicht nach Länge sortiert zu sein:

emacs-common-proofgeneral.noarch : Emacs mode for standard interaction interface for proof assistants
coq-emacs-el.noarch : Elisp source files for Coq proof management system
emacs-gtypist.x86_64 : GNU typing tutor

Die Dokumentation sagt das

Das Ergebnis wird von den relevantesten zu den am wenigsten relevanten Ergebnissen sortiert.

Das macht Sinn. Dies ist wahrscheinlich ein sekundärer Effekt der Relevanz des Algorithmus-Matchings. Wenn der relevante Algorithmus wie folgt aussieht:

relevancy = letters_of_found_string / length_of_string_searched_in

dann werden zuerst kürzere Saiten angezeigt. Es mag suboptimal sein und seltsam aussehen (wäre nicht das erste in DNF), aber eine Diskussion über eine Upstream-Mailingliste oder eine vorgeschlagene Verbesserung von Github wäre wünschenswert.

Haftungsausschluss: Ich beteilige mich nicht an der DNF-Entwicklung und das oben Gesagte ist die Anwendung des gesunden Menschenverstands und mein Google-fu.

Jakuje
quelle