yay icon indicating copy to clipboard operation
yay copied to clipboard

--sortby functionality only implemented for "name"

Open bozoslivehere opened this issue 1 year ago • 3 comments

Affected Version

yay v12.3.5 - libalpm v14.0.0 All versions.

Describe the bug

for the --sortby flag, only functionality for "name" is implemented

Reproduction Steps

  1. Make a search and use --sortby with any option aside from name.
  2. yay -Ss potato --sortby votes

Expected behavior

It should look like this:

❯ ./yay -Ss potato --sortby votes
aur/ttf-gamja-flower 1-1 (+0 0.00) (Orphaned)
    Gamja Flower is a Korean and Latin font that reflects the graceful impression of the potato flower through the form and texture of pen writing with a rhythmic baseline.
aur/potatopresenter-appimage 1.0.2-1 (+0 0.00)
    Tool to create presentation slides that can be exported as PDF.
aur/potatopresenter 1.0.2-2 (+0 0.00)
    Tool to create presentation slides that can be exported as PDF.
aur/potatomu 2.0.0b18-1 (+0 0.00)
    A cross-platform graphical MUSH client written in Tcl/Tk.
aur/potatoalert 3.1.17-1 (+1 0.43)
    A statistics companion app for World Of Warships
aur/potato-c 0.6.3-1 (+1 0.07)
    A featureful, modular and fast pomodoro timer with server-client structure, written in C.
aur/potatoe 1:0.0.4-1 (+2 0.00)
    Prints a potatoe with a DQ quote. Configurable!
aur/jackett-mono 0.21.2371-1 (+5 0.00)
    Use many torrent trackers with software that supports torznab/potato feeds.
aur/hotpotatoes 6.1-4 (+5 0.00)
    The Hot Potatoes Suite
aur/potato 6-1 (+17 0.02) (Installed)
    A pomodoro timer for the shell
aur/jackett-bin 0.21.2371-1 (+20 0.01)
    Use many torrent trackers with software that supports torznab/potato feeds.
aur/jackett 0.21.2371-1 (+53 0.00)
    Use many torrent trackers with software that supports torznab/potato feeds.

However, none of the --sortby functionality is actually implemented except for name and the output is as follows:

❯ yay --debug -Ss potato --sortby votes
[DEBUG:runtime] rpc request https://aur.archlinux.org/rpc?arg=potato&by=name-desc&type=search&v=5
[DEBUG:runtime] packages to query [hotpotatoes jackett jackett-bin jackett-mono potato potato-c potatoalert potatoe potatomu potatopresenter potatopresenter-appimage ttf-gamja-flower]
[DEBUG:runtime] rpc request https://aur.archlinux.org/rpc?arg%5B%5D=hotpotatoes&arg%5B%5D=jackett&arg%5B%5D=jackett-bin&arg%5B%5D=jackett-mono&arg%5B%5D=potato&arg%5B%5D=potato-c&arg%5B%5D=potatoalert&arg%5B%5D=potatoe&arg%5B%5D=potatomu&arg%5B%5D=potatopresenter&arg%5B%5D=potatopresenter-appimage&arg%5B%5D=ttf-gamja-flower&type=info&v=5
aur/ttf-gamja-flower 1-1 (+0 0.00) (Orphaned)
    Gamja Flower is a Korean and Latin font that reflects the graceful impression of the potato flower through the form and texture of pen writing with a rhythmic baseline.
aur/jackett-mono 0.21.2371-1 (+5 0.00)
    Use many torrent trackers with software that supports torznab/potato feeds.
aur/jackett-bin 0.21.2371-1 (+20 0.01)
    Use many torrent trackers with software that supports torznab/potato feeds.
aur/hotpotatoes 6.1-4 (+5 0.00)
    The Hot Potatoes Suite
aur/potatopresenter-appimage 1.0.2-1 (+0 0.00)
    Tool to create presentation slides that can be exported as PDF.
aur/jackett 0.21.2371-1 (+53 0.00)
    Use many torrent trackers with software that supports torznab/potato feeds.
aur/potatopresenter 1.0.2-2 (+0 0.00)
    Tool to create presentation slides that can be exported as PDF.
aur/potatoalert 3.1.17-1 (+1 0.43)
    A statistics companion app for World Of Warships
aur/potatomu 2.0.0b18-1 (+0 0.00)
    A cross-platform graphical MUSH client written in Tcl/Tk.
aur/potato-c 0.6.3-1 (+1 0.07)
    A featureful, modular and fast pomodoro timer with server-client structure, written in C.
aur/potatoe 1:0.0.4-1 (+2 0.00)
    Prints a potatoe with a DQ quote. Configurable!
aur/potato 6-1 (+17 0.02) (Installed)
    A pomodoro timer for the shell

bozoslivehere avatar Apr 14 '24 19:04 bozoslivehere

I've got a fix already made, just trying to figure out how to make a pull request.

bozoslivehere avatar Apr 14 '24 19:04 bozoslivehere

Fixed in pull request #2429

bozoslivehere avatar Apr 16 '24 17:04 bozoslivehere