Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 202963 - portageq: Implement --match option for commands expecting cpv
Summary: portageq: Implement --match option for commands expecting cpv
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-21 21:12 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2022-10-20 02:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
a bash script that connects portageq match to portageq contents (contents.bash,180 bytes, text/plain)
2007-12-21 23:28 UTC, Zac Medico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-12-21 21:12:30 UTC
`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>.
$
Comment 1 Zac Medico gentoo-dev 2007-12-21 21:36:24 UTC
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.
Comment 2 Zac Medico gentoo-dev 2007-12-21 23:28:27 UTC
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.
Comment 3 Zac Medico gentoo-dev 2007-12-22 00:49:47 UTC
Perhaps we should implement a new command or option. For example, we could create a --contents option for the match command.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2008-03-02 14:26:32 UTC
(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.
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-03-24 22:43:35 UTC
(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
Comment 6 Zac Medico gentoo-dev 2008-03-24 22:58:17 UTC
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.