Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #267 from RedHatProductSecurity/use-re-provides-name
Browse files Browse the repository at this point in the history
GRIF-72, GRIF-91, GRIF-173 provide searching on provides
  • Loading branch information
JimFuller-RedHat authored Oct 25, 2023
2 parents 774fb5c + b6a460b commit caf278a
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 65 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### changed
* existing --search-upstreams changed to --search-all-upstreams in
service products-contain-component
### Added
* --search-provides in service products-contain-component which
will search name of components that are provide dependencies
* --search-upstreams in service products-contain-component which
will search name of components that are upstream dependencies

## [0.3.8] - 2023-10-18
### Added
Expand Down
27 changes: 23 additions & 4 deletions griffon/commands/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,20 @@ def retrieve_component_summary(ctx, component_name, strict_name_search):
default=False,
help="Search root Components (\033[1menabled by default\033[0m).",
)
@click.option(
"--search-provides",
"search_provides",
is_flag=True,
default=False,
help="Search root Components by provides children(\033[1menabled by default\033[0m).",
)
@click.option(
"--search-upstreams",
"search_upstreams",
is_flag=True,
default=False,
help="Search root Components by upstreams children (\033[1menabled by default\033[0m).",
)
@click.option(
"--search-related-url",
"search_related_url",
Expand Down Expand Up @@ -251,8 +265,8 @@ def retrieve_component_summary(ctx, component_name, strict_name_search):
help="Search community Components.",
)
@click.option(
"--search-upstreams",
"search_upstreams",
"--search-all-upstreams",
"search_all_upstreams",
is_flag=True,
default=False,
help="Search for Components by upstream.",
Expand Down Expand Up @@ -319,13 +333,15 @@ def get_product_contain_component(
sfm2_flaw_id,
flaw_mode,
search_latest,
search_provides,
search_upstreams,
search_related_url,
filter_rh_naming,
search_all,
search_all_roots,
search_redhat,
search_community,
search_upstreams,
search_all_upstreams,
no_community,
no_middleware,
no_upstream_affects,
Expand All @@ -350,10 +366,13 @@ def get_product_contain_component(
and not search_all_roots
and not search_related_url
and not search_community
and not search_upstreams
and not search_all_upstreams
and not search_redhat
and not search_provides
and not search_upstreams
):
ctx.params["search_latest"] = True
ctx.params["search_provides"] = True

params = copy.deepcopy(ctx.params)
params.pop("verbose")
Expand Down
Loading

0 comments on commit caf278a

Please sign in to comment.