You are not logged in.
Pages: 1
Topic closed
Atm when I use pacman (or trizen, for that matter) to search for packages, it shows all packages containing the word. For instance, I search for Wine and I get tons of results containing the word "wine" in the package names, including one called "twine".
So, I wonder is there any command to tell pacman/trizen to show only exact matches of the searched package? Meaning, that if I wanna find "wine", it would show me only "wine" and nothing else?
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
When you include multiple search terms, only packages with descriptions matching ALL of those terms will be returned.
┌─[Shiv ~]
└─╼ pacman -Ss firefox browser
extra/firefox 69.0-1 [installed]
Standalone web browser from mozilla.org
community/browserpass-firefox 3.1.1-1
Firefox extension for Browserpass, browser extension for zx2c4's pass (password manager)
community/firefox-developer-edition 70.0b5-1
Developer Edition of the popular Firefox web browser
community/firefox-extension-privacybadger 2019.7.1.1-1 (firefox-addons)
Block third party tracking in your browser
community/firefox-ublock-origin 1.22.2-1 (firefox-addons)
Efficient blocker add-on for various browsers. Fast, potent, and lean
┌─[Shiv ~]
└─╼ pacman -Ss firefox standalone browser
extra/firefox 69.0-1 [installed]
Standalone web browser from mozilla.org
Offline
Why would you want to use a search flag if you know the exact name of the package, you already know the name!
Do you want information about that package? Then use `pacman -Si wine`.
Do you want to install that package? Then use `pacman -S wine`.
Do you want to know if that package is installed? Then use `pacman -Q wine`.
What exactly is it that you think you might come to know about the wine package by using `pacman -Ss wine`?
Note that pacman search can have some regex syntax, e.g., `pacman -Ss ^wine$` would return only a package exactly matching wine, but again, what on earth would be the point of that command?
Last edited by Trilby (2019-09-17 01:26:44)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
I think the regex matching is broken, since pacman does not value the EOL character correctly:
$ pacman -Ss wine
community/twine 1.14.0-1
Collection of utilities for interacting with PyPI
community/vkd3d 1.1-1
Direct3D 12 to Vulkan translation library By WineHQ
community/wine-mono 4.9.2-1
Wine's built-in replacement for Microsoft's .NET Framework
community/winetricks 20190912-1
Script to install various redistributable runtime libraries in Wine.
multilib/lib32-vkd3d 1.1-2
Direct3D 12 to Vulkan translation library By WineHQ
multilib/wine 4.15-1
A compatibility layer for running Windows programs
multilib/wine-nine 0.4-1
Gallium Nine Standalone
multilib/wine-staging 4.15-1
A compatibility layer for running Windows programs - Staging branch
multilib/wine_gecko 2.47-2
Wine's built-in replacement for Microsoft's Internet Explorer
$ pacman -Ss ^wine$
multilib/wine 4.15-1
A compatibility layer for running Windows programs
multilib/wine-staging 4.15-1
A compatibility layer for running Windows programs - Staging branch
Last edited by schard (2019-09-17 09:13:26)
macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }
Offline
wine-staging provides wine.
allan@kamala ~
> pacman -Sqs gcc | wc -l
20
allan@kamala ~
> pacman -Sqs gcc$ | wc -l
12
Offline
That's because -Ss also searches provides (and wine-staging provides "wine", which matches the regex).
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Why would you want to use a search flag if you know the exact name of the package, you already know the name!
what on earth would be the point of that command?
Maybe because 'pacman -Q wine' is slow when someone have many packages installed and old, slow hard drive.
Or maybe he want limit output of match. Try for example 'pacman -Ss file'.
Last edited by xerxes_ (2019-09-17 11:01:37)
Offline
Maybe because 'pacman -Q wine' is slow when someone have many packages installed and old, slow hard drive.
Yet, running "pacman -Ss" reads every file pacman -Q does...
Offline
Why would you want to use a search flag if you know the exact name of the package, you already know the name!
Do you want information about that package? Then use `pacman -Si wine`.
Do you want to install that package? Then use `pacman -S wine`.
Do you want to know if that package is installed? Then use `pacman -Q wine`.What exactly is it that you think you might come to know about the wine package by using `pacman -Ss wine`?
Note that pacman search can have some regex syntax, e.g., `pacman -Ss ^wine$` would return only a package exactly matching wine, but again, what on earth would be the point of that command?
pacman -Ss wine shows a huge list of packages that contain these characters in their names and I was hoping that after eliminating the unnecessary packages from the list, I'll be able to make it show the results in this manner: [package name] [installed version] [available version in the repo].
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
Or maybe he want limit output of match.
I got that - but to what end? For what purpose? Limiting output to packages that start with "wine" may make sense, and that's precisely what a regex could do. But why would one search for a package when they already know the exact name of it?
Maybe because 'pacman -Q wine' is slow when someone have many packages installed and old, slow hard drive.
And in every such case, `pacman -Ss wine` would be far slower; orders of magnitude slower in my case.
I'll be able to make it show the results in this manner: [package name] [installed version] [available version in the repo].
Even pacman -Ss doesn't show that format*. But that still really doesn't answer the question, what purpose would this serve?
*note: pacman does not show the different version numbers, and more importantly, even if it did, it wouldn't show the installed version and repo version, it would show the installed version and sync database version ... and if these ever differ, you should stop doing partial upgrades.
Last edited by Trilby (2019-09-17 11:55:39)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
I just wanna know when the new version of wine (or other packages I use) has finally arrived in the repo. I saw an article from about a day ago saying Wine 4.16 is released but when I run the update command, it says both installed and available versions are the same. So apparently I'm missing something, I just don't know what it is.
Core i7-4770, GTX 1660 Ti, 32 GB RAM, Arch 6.x LTS, Cinnamon 5.2.7, GDM
Offline
Ah, so it is a complete XY question.
Pacman -Ss could not give you a different version than pacman -S. If the version you are (re)installing doesn't match what is actually in the repos then you either need to update your db or update your mirrorlist. But again, there is no output of `pacman -Ss ...` that could serve any useful purpose here.
In this case, however, 4.16 was just released and is not in the repos yet, so your question is just #6.
I also have a sense that you are doing partial upgrades. There is no need to explicitly list package names to upgrade them. If you got output noting that the current version was being reinstalled, you must have added 'wine' to the pacman command line. There is no need for this. Upgrade properly and regularly with `pacman -Syu` and you will get the new wine package as soon as it is ready.
Last edited by Trilby (2019-09-17 12:04:41)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
'checkupdates' command show if there are some packages to update and from what version to what; than you can do 'pacman -Syu'.
Also you can check site https://www.archlinux.org/packages/?sort=-last_update
Last edited by xerxes_ (2019-09-17 15:17:08)
Offline
Why would you want to use a search flag if you know the exact name of the package, you already know the name!
Do you want information about that package? Then use `pacman -Si wine`.
Do you want to install that package? Then use `pacman -S wine`.
Do you want to know if that package is installed? Then use `pacman -Q wine`.What exactly is it that you think you might come to know about the wine package by using `pacman -Ss wine`?
Note that pacman search can have some regex syntax, e.g., `pacman -Ss ^wine$` would return only a package exactly matching wine, but again, what on earth would be the point of that command?
-Qi shows too much information. I just want the information shown by -Qs, and I only want it for precise matches, and I don't want to use grep or anything to filter the results of -Qi. I'm writing a script and just ran into a use case of this today; that's how I ended up on this thread.
Offline
-Qi shows too much information.
This is one of several reasons why I never suggested -Qi or -Qs. But given that this is a three year old thread and your use case is completely different than the OPs, you should open your own thread and not necrobump.
Last edited by Trilby (2022-07-03 18:59:04)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
Closing this old topic.
Offline
Pages: 1
Topic closed