From efbb40c14f51a4a20b654538c166b4ab22978fca Mon Sep 17 00:00:00 2001 From: Adam Haile Date: Fri, 30 Nov 2018 10:31:57 -0500 Subject: [PATCH] v0.2.2: Fix filtering --- doozer | 2 +- doozerlib/runtime.py | 8 ++++++-- setup.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doozer b/doozer index a10022808..6fe498dba 100755 --- a/doozer +++ b/doozer @@ -1132,7 +1132,7 @@ def config_mode(runtime, mode, push, message): """ _fix_runtime_mode(runtime) if not runtime.wip and CONFIG_RUNTIME_OPTS['mode'] == 'both': - click.echo('Updating all mode for all configs in group is not allowed! Please specifiy configs directly.') + red_print('Updating all mode for all configs in group is not allowed! Please specifiy configs directly.') sys.exit(1) runtime.initialize(**CONFIG_RUNTIME_OPTS) config = mdc(runtime) diff --git a/doozerlib/runtime.py b/doozerlib/runtime.py index 3b0cf4475..cd83b981c 100644 --- a/doozerlib/runtime.py +++ b/doozerlib/runtime.py @@ -278,7 +278,7 @@ def flatten_list(names): return list(set([y for x in result for y in x])) def filter_wip(n, d): - return d.get('mode', None) == 'wip' + return d.get('mode', 'enabled') in ['wip', 'enabled'] def filter_enabled(n, d): return d.get('mode', 'enabled') == 'enabled' @@ -297,6 +297,10 @@ def filter_disabled(n, d): filter_func = filter_wip elif self.load_disabled: filter_func = filter_disabled + else: + filter_func = filter_enabled + + print(filter_func) image_data = self.gitdata.load_data(path='images', keys=image_keys, exclude=exclude_keys, @@ -323,7 +327,7 @@ def filter_disabled(n, d): if mode in ['rpms', 'both']: for r in rpm_data.itervalues(): - metadata = RPMMetadata(self, r) + metadata = RPMMetadata(self, r, clone_source=clone_source) self.rpm_map[metadata.distgit_key] = metadata if not self.rpm_map: self.logger.warning("No rpm metadata directories found for given options within: {}".format(self.group_dir)) diff --git a/setup.py b/setup.py index 6d2e7e46b..c18381bfe 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ name="doozer", author="AOS ART Team", author_email="aos-team-art@redhat.com", - version="0.2.1", + version="0.2.2", description="CLI tool for managing and automating Red Hat software releases", url="https://github.com/openshift/doozer", license="Red Hat Internal",