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