From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: /, roverlay/
Date: Tue, 5 Feb 2013 17:48:24 +0000 (UTC) [thread overview]
Message-ID: <1360086387.d269d111a7b37dae7824594a8c2f8c060a7a67a5.dywi@gentoo> (raw)
commit: d269d111a7b37dae7824594a8c2f8c060a7a67a5
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Tue Feb 5 17:46:27 2013 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Tue Feb 5 17:46:27 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=d269d111
roverlay: --print-package-rules (--ppr)
Added new arg --print-package-rules (--ppr) that prints the package rules
to stdout after reading them. Similar to --print-config, roverlay will
exit afterwards.
---
roverlay.py | 15 +++++++++++++++
roverlay/argutil.py | 18 ++++++++++++++++++
2 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/roverlay.py b/roverlay.py
index a13be00..d18a987 100755
--- a/roverlay.py
+++ b/roverlay.py
@@ -259,6 +259,21 @@ def roverlay_main():
die ( "Cannot print config!" )
EXIT_AFTER_CONFIG = True
+ if OPTION ( 'print_package_rules' ):
+ # no try-/catch block here
+
+ import roverlay.packagerules.rules
+
+ HLINE = "".rjust ( 79, '-' )
+ print ( HLINE )
+ print (
+ str ( roverlay.packagerules.rules.PackageRules.get_configured() )
+ )
+ print ( HLINE )
+
+ EXIT_AFTER_CONFIG = True
+
+ # -- end of EXIT_AFTER_CONFIG entries
if 'EXIT_AFTER_CONFIG' in locals() and EXIT_AFTER_CONFIG:
pass
diff --git a/roverlay/argutil.py b/roverlay/argutil.py
index ceb8baa..d7d8444 100644
--- a/roverlay/argutil.py
+++ b/roverlay/argutil.py
@@ -127,6 +127,14 @@ def get_parser ( command_map, default_config_file, default_command='create' ):
)
arg (
+ '-P', '--package-rules', default=argparse.SUPPRESS,
+ action='append',
+ help="package rule file, can be specified more than once.",
+ type=is_fs_file_or_dir,
+ metavar='<file|dir>',
+ )
+
+ arg (
'--distdir', '--from', default=argparse.SUPPRESS,
action='append',
help='''
@@ -236,6 +244,12 @@ def get_parser ( command_map, default_config_file, default_command='create' ):
)
arg (
+ '--print-package-rules', '--ppr',
+ help="print package rules after parsing them and exit",
+ **opt_in
+ )
+
+ arg (
'--list-config-entries', '--help-config',
help="list all known config entries",
**opt_in
@@ -320,6 +334,7 @@ def parse_argv ( command_map, **kw ):
print_stats = p.stats,
print_config = p.print_config,
list_config = p.list_config_entries,
+ print_package_rules = p.print_package_rules,
force_distroot = p.force_distroot,
skip_manifest = p.no_manifest,
incremental = p.incremental,
@@ -339,6 +354,9 @@ def parse_argv ( command_map, **kw ):
if given ( 'repo_config' ):
doconf ( p.repo_config, 'REPO.config_files' )
+ if given ( 'package_rules' ):
+ doconf ( p.package_rules, 'PACKAGE_RULES.files' )
+
if given ( 'distroot' ):
doconf ( p.distroot, 'distfiles.root' )
next reply other threads:[~2013-02-05 17:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 17:48 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-23 7:28 [gentoo-commits] proj/R_overlay:master commit in: /, roverlay/ Benda XU
2014-08-23 19:03 André Erdmann
2014-07-29 20:26 André Erdmann
2014-08-23 19:03 ` André Erdmann
2013-09-23 15:30 André Erdmann
2013-08-19 15:42 André Erdmann
2013-08-09 10:18 André Erdmann
2013-07-11 17:11 André Erdmann
2013-04-25 16:44 André Erdmann
2013-02-09 20:45 André Erdmann
2013-01-28 23:54 André Erdmann
2013-01-09 19:15 André Erdmann
2012-08-20 14:04 André Erdmann
2012-08-02 15:14 André Erdmann
2012-07-30 15:53 André Erdmann
2012-07-06 22:19 André Erdmann
2012-07-05 16:00 André Erdmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360086387.d269d111a7b37dae7824594a8c2f8c060a7a67a5.dywi@gentoo \
--to=dywi@mailerd.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox