`portageq contents` doesn't work for packages specified without versions. It also doesn't work for packages specified with slots. $ portageq contents / x11-base/xorg-x11 Package not found: 'x11-base/xorg-x11' $ portageq contents / x11-base/xorg-x11-7.3 /etc /etc/X11 /etc/X11/xorg.conf /usr /usr/X11R6 $ `portageq --help | grep -A3 contents` doesn't say that versions are required: $ portageq --help | grep -A3 contents contents <root> <category/package> List the files that are installed for a given package, with one file listed on each line. All file names will begin with <root>. $
I was intending to make it a relatively low-level function (like most other portageq functions) without any matching support. You can use the results from something like `portageq match / <atom>` if you don't know which packages to feed to portageq contents. The portageq metadata function is similar. Both assume that you are querying a single specific package.
Created attachment 139067 [details] a bash script that connects portageq match to portageq contents My intention was to provide the ability to write scripts similar to this one.
Perhaps we should implement a new command or option. For example, we could create a --contents option for the match command.
(In reply to comment #3) > Perhaps we should implement a new command or option. For example, we could > create a --contents option for the match command. I wouldn't like that at all. The opposite (a --match option for commands expecting a cpv) however would be ok with me and seems more useful anyway. But I guess the complaint is more about the misleading help text.
(In reply to comment #4) > (In reply to comment #3) > > Perhaps we should implement a new command or option. For example, we could > > create a --contents option for the match command. > > I wouldn't like that at all. The opposite (a --match option for commands > expecting a cpv) however would be ok with me and seems more useful anyway. +1
So, what kind of match should it be: highest match, or all matches? I guess it makes sense to show all matches and just concatenate the outputs from each of the matches.