Skip to content

Commit b3cc0cc

Browse files
committed
pkgcheck scan: rename --filtered option to -f/--filter
And add a required argument for it since we're targeting making the filter mechanism configurable.
1 parent e3cef4f commit b3cc0cc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pkgcheck/scripts/pkgcheck.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __call__(self, parser, namespace, values, option_string=None):
136136
action=commandline.StoreRepoObject, repo_type='ebuild-raw', allow_external_repos=True,
137137
help='repo to pull packages from')
138138
main_options.add_argument(
139-
'--filtered', action='store_true', default=False,
139+
'-f', '--filter', choices=('repo',),
140140
help="enable all license and visibility filtering for packages",
141141
docs="""
142142
Enable all package filtering mechanisms such as ACCEPT_KEYWORDS,
@@ -350,8 +350,8 @@ def _validate_scan_args(parser, namespace):
350350
target_repo = namespace.config.get_default('repo')
351351
namespace.target_repo = target_repo
352352

353-
# use filtered repo if filtering is enabled
354-
if namespace.filtered:
353+
# use filtered repo if requested
354+
if namespace.filter == 'repo':
355355
namespace.target_repo = namespace.domain.ebuild_repos[namespace.target_repo.repo_id]
356356

357357
# determine if we're running in the gentoo repo or a clone

0 commit comments

Comments
 (0)