Updated Paru 2.0 vs Yay

I was excited to use Paru in the past, however - as development seemed to take a backseat, I reverted to Yay.

I love Yay - but Paru is written in Rust, so I kept it - and with the update today decided to test it again.

The test is this:

We want to install Plex, maybe media player, maybe the server - so we search:

yay plex and paru plex

Yay brings interesting results, but Paru finds more results from the description than it does from the name - does anyone else have this issue?

Specifically, YAY brought me the server (3rd item) and the player (5th item) as well as pulling in the ‘plexamp’ package and ‘plex-desktop’ at number 22.

Paru pulled in libmpc relevant because of ‘comPLEX numbers’… and a bunch of other spam without actually getting any application with PLEX in it’s name!!!

I tested with the default config - with ‘bottomup’ added, because it strangely isn’t the default.

I often run into the question/‘bug report’/support thing about spelling and words.

Perhaps the search phrase provided is too broad - which such fuzzy searches - searching in multiple coloumns - returns to broad an answer.

e.g. searching for plex - returns text containing both simplex and plex.

Not that it is an issue in this context - the same is used by those trying to inject malware into public repositories like npm and pypi as prominent examples.

paru --searchby <field>

but I agree the results are somewhat random

Yes - as I say, I like yay because a lazy search yay plex will find what I want - I’m sure it is defaulting to search the name as a high priority.

I’m confused why paru doesn’t, and can’t imagine why anyone would use paru if it works the same way for them.

When I use paru --searchby name plex I get exactly the same result - it is ignored.

So in the end, I’ll keep using yay - but I can’t help but think that I did something wrong.

I’m going to check it out on a clean profile…

The search engine certainly need trimming :rofl:

 $ paru search --searchby name plex
1 core/perl 5.38.0-1 [20.26 MiB 75.91 MiB] [Installed]
    A highly capable, feature-rich programming language
1 Like

I think it’s time to dig into the config - as yay isn’t too great with the default either (the player and server were around result 40 to 50, as with paru).

Maybe there’s an issue with the paru config syntax…

yay:

	"sortby": "popularity",
	"searchby": "name-desc",

paru

       SortBy = votes
       SearchBy = name

Paru ignores it all, mpc still comes first on ‘complex’ in the description.

try to run:

paru " plex" 

Are you sure? Did you scroll up?

One thing to notice is that paru sorts the repos - you get core first, aur last.
While yay seems to try to sort the output based upon ‘relevance’.

Its probably up to taste … but I prefer a ‘dumb’ search that does what its told.
Yes that means returning a positive on “complex” when searching “plex”.

1 Like

In my parttime job - I am trying to educate my users to do exactly that.

It is not the software’s responsibility to figure out what the user meant - just present the result - if the result is not the expected - refine the search.

As for the plex example, the search seems to be a ‘contains’ phrase - which of course will return numerous false positives for words having the letters ‘plex’ in exactly that order in either description or name.

1 Like

The additional search command does not exist. Paru searches by default:

paru --searchby name plex

or with regex: paru -x '^plex'

2 Likes

It is only for AUR search, not for repository search.

I like to use paru -Sss " plex" to show URLs and sources.

It would be okay if it would return results from ‘name’ before returning other results from ‘description’.

The annying part is that I don’t seem to be able to pass a flag to search ONLY in the name.
@Zesko so you found plex media server and players with that?

Summary
extra/ttf-ibmplex-mono-nerd 3.0.2-1 [3.47 MiB 87.66 MiB] (nerd-fonts)
    Patched font IBM Plex Mono (Blex) from nerd fonts library
    URL     : https://github.com/ryanoasis/nerd-fonts
extra/ttf-ibm-plex 6.3.0-1 [0 B 57.20 MiB] [Installed]
    IBM Plex Mono, Sans, and Serif
    URL     : https://github.com/IBM/plex
⏎                                                                                                             

paru -x '^plex' is closer - but excludes repos.

It’s a bit sad that pamac is the only tool to search them all (including flatpaks).

This is quite right - but also slightly annoying - but yes, as with ‘yay’ before I edited the config, the result would be around 46-48 in the running (with plex in the name).

PamacGUI gets Plex (flathub) first, then Plex-HTPC (Flathub) followed by AUR ‘plex-media-server’.

I can’t figure out why I can’t do:
paru --searchby name "plex"

This searchby limitation is only valid for AUR package, for repo-packages, it searches in name and description.

From their GitHub:

Repo searches are done by name, desc, provides. This is what pacman does and it can’t be controlled. Pacman -Ss is also regex by default. --regex and --searchby only effect searching the AUR.
(Source: Looking for packages only by name in AUR · Issue #1036 · Morganamilo/paru · GitHub)

The output of paru -Sss " plex", plex-media-* (3. entry and 5. entry) appear in the list .

extra/ttf-ibm-plex 6.3.0-1 [17.44 MiB 57.20 MiB]
    IBM Plex Mono, Sans, and Serif
    URL     : https://github.com/IBM/plex
extra/ttf-ibmplex-mono-nerd 3.1.1-1 [3.47 MiB 88.32 MiB] (nerd-fonts)
    Patched font IBM Plex Mono (Blex) from nerd fonts library
    URL     : https://github.com/ryanoasis/nerd-fonts
aur/plex-media-server 1.32.7.7621-1 [+347 ~1.40]
    The back-end media server component of Plex.
    URL     : https://plex.tv/
    AUR URL : https://aur.archlinux.org/packages/plex-media-server
aur/plex-media-server-plexpass 1.32.8.7639-1 [+139 ~0.07]
    The back-end media server component of Plex.
    URL     : https://plex.tv/
    AUR URL : https://aur.archlinux.org/packages/plex-media-server-plexpass
aur/plex-media-player 2.58.1-3 [+108 ~0.37]
    Next generation Plex Desktop Client
    URL     : https://github.com/plexinc/plex-media-player
    AUR URL : https://aur.archlinux.org/packages/plex-media-player
aur/otf-ibm-plex 6.3.0-1 [+23 ~0.00]
    IBM Plex Mono, Sans, and Serif typefaces in otf format
    URL     : https://github.com/IBM/plex
    AUR URL : https://aur.archlinux.org/packages/otf-ibm-plex
aur/plexamp-appimage 4.8.4-1 [+18 ~0.02]
    Modern music client for Plex
    URL     : https://plexamp.com
    AUR URL : https://aur.archlinux.org/packages/plexamp-appimage
...
...

Another possibility:

I use fish shell that has a nice autocompletion of paru in Konsole.

$ paru -S plex-m
plex-media-player  (AUR)  plex-media-player-standalone-service  (AUR)  plex-media-server  (AUR)  plex-media-server-plexpass  (AUR)  plex-mpv-shim  (AUR)

Then I think I need to delete the config because I got this:

paru -Sss " plex"                  ✔   9:03:17 pm
extra/ttf-ibmplex-mono-nerd 3.0.2-1 [3.47 MiB 87.66 MiB] (nerd-fonts)
    Patched font IBM Plex Mono (Blex) from nerd fonts library
    URL     : https://github.com/ryanoasis/nerd-fonts
extra/ttf-ibm-plex 6.3.0-1 [0 B 57.20 MiB] [Installed]
    IBM Plex Mono, Sans, and Serif
    URL     : https://github.com/IBM/plex

But yes, works nice with autocomplete. As does Pamac (though sadly only the GUI can pull in Flathub results).

They are in the repository that has a higher priority than AUR in the search list. :man_shrugging:

I got a message from the developer saying to try paru -a Plex, however this just filters aur.

Ill have a go in the morning.

The option -a is only for AUR search without the repository.

I completely dropped yay and paru a good while back for pikaur. For me seems to behave exactly as I like.

Yes, basically the developer wants Paru (unlike Yay) to be more akin to using pacman…

Pikaur is interesting, but again - yay just seems more convenient to enter a fuzzy search and see results.

Hmmm so overall, I won’t bother going back with Paru - I’m really quite happy using yay, and sometimes adding a GUI Pamac search if I want to include flatpak alternatives.