mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 08:12:55 +00:00
Add rhel-target none option
Signed-off-by: Troy Dawson <tdawson@redhat.com>
This commit is contained in:
parent
790841602b
commit
e25a639d57
1 changed files with 19 additions and 16 deletions
|
@ -202,27 +202,30 @@ class centpkgClient(cliClient):
|
|||
* zstream - If pre-GA of a y-stream release, this will build for 0day.
|
||||
If post-GA of a Y-stream release, this will build for the Z-stream of that release.
|
||||
* latest - This will always build for the next Y-stream release
|
||||
* none - This will not build in brew. No rhel metadata is set.
|
||||
|
||||
'''.format('\n'.join(textwrap.wrap(build_parser.description))))
|
||||
|
||||
# Now add our additional option
|
||||
build_parser.add_argument(
|
||||
'--rhel-target',
|
||||
choices=['exception', 'zstream', 'latest'],
|
||||
choices=['exception', 'zstream', 'latest', 'none'],
|
||||
help='Set the rhel-target metadata')
|
||||
|
||||
# Overloaded _build
|
||||
def _build(self, sets=None):
|
||||
|
||||
# Only do rhel-target if we are centpkg, not centpkg-sig
|
||||
# Only do rhel-target if we are centpkg, not centpkg-sig, or if we are doing scratch
|
||||
if not os.path.basename(sys.argv[0]).endswith('-sig') and not self.args.scratch:
|
||||
|
||||
# Only run if we have internal configuraions, or scratch
|
||||
# Only run if we have internal configuraions
|
||||
internal_config_file = "/etc/rpkg/centpkg_internal.conf"
|
||||
if os.path.exists(internal_config_file):
|
||||
|
||||
# If rhel-target is set, no need to check, just use it
|
||||
if hasattr(self.args, 'rhel_target') and self.args.rhel_target:
|
||||
# If rhel-target set to none, do nothing with metadata
|
||||
if self.args.rhel_target.lower() != "none":
|
||||
# If custom-user-metadata set, add onto it
|
||||
if hasattr(self.args, 'custom_user_metadata') and self.args.custom_user_metadata:
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue