diff options
author | 2015-12-06 01:36:38 -0500 | |
---|---|---|
committer | 2015-12-06 01:36:38 -0500 | |
commit | 6a4ab9f7bdc904e4b0308f722ce1ddb121ff2d88 (patch) | |
tree | 093dcbfda7c45192f3f35fb3151e22ea9adf4124 | |
parent | man/pkgcore: fix typo (diff) | |
download | pkgcore-6a4ab9f7bdc904e4b0308f722ce1ddb121ff2d88.tar.gz pkgcore-6a4ab9f7bdc904e4b0308f722ce1ddb121ff2d88.tar.bz2 pkgcore-6a4ab9f7bdc904e4b0308f722ce1ddb121ff2d88.zip |
pmerge: move extended target arg docs to StoreTarget
-rw-r--r-- | pkgcore/scripts/pmerge.py | 19 | ||||
-rw-r--r-- | pkgcore/util/commandline.py | 20 |
2 files changed, 20 insertions, 19 deletions
diff --git a/pkgcore/scripts/pmerge.py b/pkgcore/scripts/pmerge.py index 71e93b2a..4fe01053 100644 --- a/pkgcore/scripts/pmerge.py +++ b/pkgcore/scripts/pmerge.py @@ -34,24 +34,7 @@ argparser = commandline.mk_argparser(domain=True, description=__doc__) argparser.add_argument( nargs='*', dest='targets', metavar='TARGET', action=commandline.StoreTarget, help="extended package matching", - docs=""" - pmerge supports various target arguments including the following: - - atom - An extended atom syntax is supported, see the related section - in pkgcore(5). - - package set - Used to define lists of packages, the syntax used for these is - @pkgset. For example, the @system and @world package sets are - supported. - - extended globbing - Globbing package names or atoms allows for use cases such as - ``'far*'`` (merge every package starting with 'far'), - ``'dev-python/*::gentoo'`` (merge every package in the dev-python - category from the gentoo repo), or even '*' (merge everything). - """) + docs=commandline.StoreTarget.__doc__.split('\n', 1)[1:]) query_options = argparser.add_argument_group("Package querying options") query_options.add_argument( diff --git a/pkgcore/util/commandline.py b/pkgcore/util/commandline.py index 10539f8d..c0725959 100644 --- a/pkgcore/util/commandline.py +++ b/pkgcore/util/commandline.py @@ -88,7 +88,25 @@ class ExtendCommaDelimited(argparse._AppendAction): class StoreTarget(argparse._AppendAction): - """Parse extended package atom syntax and optionally set arguments.""" + """Parse extended package atom syntax and optionally set arguments. + + Various target arguments are supported including the following: + + atom + An extended atom syntax is supported, see the related section + in pkgcore(5). + + package set + Used to define lists of packages, the syntax used for these is + @pkgset. For example, the @system and @world package sets are + supported. + + extended globbing + Globbing package names or atoms allows for use cases such as + ``'far*'`` (merge every package starting with 'far'), + ``'dev-python/*::gentoo'`` (merge every package in the dev-python + category from the gentoo repo), or even '*' (merge everything). + """ def __init__(self, sets=True, *args, **kwargs): super(StoreTarget, self).__init__(*args, **kwargs) |