root/masterdriverz/use-expand/doc/extended-atom-syntax.rst @ marienz%2540gentoo.org-20070114214713-ifemyxc44xj4qld7

Revision marienz%2540gentoo.org-20070114214713-ifemyxc44xj4qld7, 2.7 kB (checked in by Marien Zwart <marienz@…>, 2 years ago)

Unhork table.

Line 
1pkgcore supports an extended form of atom syntax- examples are provided below.
2
3This form can be used in configuration files, but in doing so portage will have
4issues with the next syntax- thus if you're after maintaining configuration
5compatibility, limit usage of the extended syntax to commandline only.
6
7===============  =========================================================
8token            result
9===============  =========================================================
10*                match all
11portage          package name must be ''portage''
12dev-util/*       category must be ''dev-util''
13dev-*/*          category must start with ''dev-''
14dev-util/*       category must be ''dev-util''
15dev-*            package must start with ''dev-''
16*cgi*            package name must have ''cgi'' in it
17*x11*/X*         category must have ''x11'' in it, package must start with
18                 ''X''
19*-apps/portage*  category must end in ''-apps'', package must start with
20                 ''portage''
21=portage-1.0     match version 1.0 of any 'portage' package
22===============  =========================================================
23
24
25Additionally, pkgcore supports additional atom extensions that are more
26'pure' to the atom specification.
27
28
29Use Dep atoms
30-------------
31
32http://bugs.gentoo.org/2272 has the details, but a use dep atom is basically a
33normal atom that is able to force/disable flags on the target atom.  Portage
34currently doesn't support use deps, although pkgcore and paludis do.
35
36Syntax:
37
38  normal-atom[enabled_flag1,enabled_flag2,-disabled_flag,-disabled_flag2]
39
40Example-
41 
42  sys-apps/portage[build]
43
44Would match only sys-apps/portage with the build flag forced on.
45
46Forcing 'build' off while forcing 'doc' on would be-
47
48  sys-apps/portage[-build,doc]
49
50
51Slot dep atoms
52--------------
53
54Slot dep atoms allow for finer grained matching of packages- portage as of
552.1.2 supports them, but they're currently unable to be used in the tree.
56
57Syntax:
58
59  normal-atom:slot1,slot2,slot3
60
61Matching just python in slot '2.3':
62
63  dev-lang/python:2.3
64
65Matching python in slot '2.3' or '2.4'
66
67  dev-lang/python:2.3,2.4
68
69
70repo_id atoms
71_____________
72
73Main usage of this form is to limit an atom to match only within a specific
74repository- for example, to state "I need python from the gentoo-x86 repository
75_only_"
76
77syntax:
78 
79  normal-atom::repository-id
80
81Example:
82
83  sys-devel/gcc::gentoo
84
85A complication of this form is that ':' is also used for slots- '::' is treated
86as strictly repository id matching, and must be the last token in the atom.
87
88If you need to do slot matching in addition, it would be
89
90  sys-devel/gcc:3.3:gentoo
91
92Which would match slot '3.3' from repository 'gentoo' (defined in
93profiles/repo_name) of sys-devel/gcc.
Note: See TracBrowser for help on using the browser.