You are not logged in.

#1 2013-09-23 14:15:25

maggie
Member
Registered: 2011-02-12
Posts: 255

Pacman to show all the files inside a package that is not installed

Can pacman list out all the files that any packages provides without having that package installed? I learned that pacman -Ql linux does this but the linux packages is installed on my system. Thanks!

Offline

#2 2013-09-23 14:16:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,564
Website

Re: Pacman to show all the files inside a package that is not installed

No, but pkgfile will.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-09-23 14:29:31

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Pacman to show all the files inside a package that is not installed

I am trying to use it but it doesn't work right with my options. I want to find any package that gives a directory called "russian" but it isn't finding one I know does called "festvox-ru" as I show you:

% pkgfile -svid russian 
extra/licq 1.7.1-5              	/usr/share/licq/translations/RUSSIAN
community/gnustep-base 1.24.5-2 	/usr/lib/GNUstep/Libraries/gnustep-base/Versions/1.24/Resources/Languages/Russian
community/lout 3.40-1           	/usr/lib/lout/include/russian
community/nltk-data 2.0-7       	/usr/share/nltk_data/corpora/stopwords/russian
community/rawtherapee 1:4.0.11-1	/usr/share/rawtherapee/languages/Russian

Here you see the "russian" directory inside my filesystem with that package:

/usr/share/festival/voices/russian

Last edited by maggie (2013-09-23 14:34:13)

Offline

#4 2013-09-23 14:43:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Pacman to show all the files inside a package that is not installed

maggie wrote:

Can pacman list out all the files that any packages provides without having that package installed?

Do you want something like https://www.archlinux.org/packages/comm … -ru/files/ ?

Offline

#5 2013-09-23 14:44:24

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Pacman to show all the files inside a package that is not installed

Maybe a bug or limitation of pkgfile. Notice that in all results returned by the search, "russian" is at the end of the path, whereas in festvox-ru it's in the middle:

$ pkgfile -l festvox-ru
...
community/festvox-ru	/usr/share/festival/voices/russian/msu_ru_nsh_clunits/lab/ru_0768.lab

Searching with regex enabled works, but the output is... excessive.

Last edited by alphaniner (2013-09-23 14:45:13)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2013-09-23 14:44:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,564
Website

Re: Pacman to show all the files inside a package that is not installed

It seems the file list data for festvox-ru may not be properly formatted: it does not list that directory itself; contrast the following output.

** removed now-irrelevant example **

pkgfile -r gets by this limitation.

EDIT: I was beat to this I see.  The output is only excessive with the 'v' flag along with the regex match.  `pkgfile -rd russian` gives a very manageable output.

Last edited by Trilby (2013-09-23 15:05:52)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2013-09-23 14:48:30

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Pacman to show all the files inside a package that is not installed

@Trilby

I think /usr/lib/lout/include/russian is not a directory.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#8 2013-09-23 15:26:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,605

Re: Pacman to show all the files inside a package that is not installed

If you download the package first, you can use "pacman -Qlp <filename>"

Last edited by Scimmia (2013-09-23 15:27:47)

Offline

#9 2013-09-23 16:04:38

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Pacman to show all the files inside a package that is not installed

I see. So if the target directory is not defined as a terminal one that means my search fails. Maybe falconindy can explain if this is a bug or meant to happen.

Terminal means it is a dir name that is ending in a full path but not in the middle of a path.
This is terminal: /usr/lib/lout/include/russian
This is in the middle of a path: /usr/share/festival/voices/russian/msu_ru_nsh_clunits/etc/

Last edited by maggie (2013-09-23 16:13:50)

Offline

#10 2013-09-23 16:22:16

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Pacman to show all the files inside a package that is not installed

It's documented behavior in the manpage:

pkgfile(1) wrote:

MATCHING HEURISTICS
       In --search mode and without the --regex or --glob option, pkgfile will attempt to match the provided target as an exact filename. If the target contains a '/' character, a full path match will be attempted. With --regex and
       --glob enabled searching, pkgfile will always match against the full pathname.

       In --list mode and without the --regex or --glob option, pkgfile will attempt to match the provided target as an exact package name. If the target contains a '/' character, the text before the slash will be assumed to be a
       repository and the search will be restricted.

Patches welcome if this is unclear...

Offline

#11 2017-12-01 17:08:08

Chinggis6
Member
Registered: 2017-03-01
Posts: 6

Re: Pacman to show all the files inside a package that is not installed

yes there is -F switch for it

one can do pacman -Fyy and then pacman -Fl pkgname

first it will download (or update) the package list that active/enabled repositories provide

and then list (installed or not) package contents locally when invoked, even without the internet connection

F is for file and its called 'file database'

i'd also like to have a switch to remove somewhat 'duplicate' (repeated) directory names from the output (of both -Ql and -Fl)

Offline

#12 2017-12-01 17:15:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,605

Re: Pacman to show all the files inside a package that is not installed

Chinggis6 wrote:

yes there is -F switch for it

There wasn't when this thread started over 4 years ago. This is exactly why you shouldn't necrobump. Go back and re-read the Code of Conduct.

https://wiki.archlinux.org/index.php/Co … bumping.22

Offline

#13 2017-12-01 17:16:32

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,902
Website

Re: Pacman to show all the files inside a package that is not installed

Indeed. Closing.


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

Board footer

Powered by FluxBB