mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
cmds.projects.BaseCmdPkgRelations: Support --hide-self
To support the pkg-install-testbuild-deps target, a selector is needed listing all prerequisites to be installed except the project under test. --hide-self should be useful for that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
489652a02f
commit
d7e4bd9e33
1 changed files with 6 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ class BaseCmdPkgRelations(Cmd):
|
|||
ignore: set[str] = set(),
|
||||
quote: bool = False,
|
||||
skip_excluded: bool = False,
|
||||
hide_self = False,
|
||||
) -> list[str]:
|
||||
|
||||
if subsections is None:
|
||||
|
|
@ -122,6 +123,8 @@ class BaseCmdPkgRelations(Cmd):
|
|||
case _:
|
||||
raise NotImplementedError(f'Expanding SemVer range "{dep[0]} {dep[1]} {dep[3]}" is not yet implemented')
|
||||
for expanded_dep in expanded_deps:
|
||||
if hide_self and dep_name in modules:
|
||||
continue
|
||||
match syntax:
|
||||
case self.Syntax.semver:
|
||||
pass
|
||||
|
|
@ -158,6 +161,7 @@ class BaseCmdPkgRelations(Cmd):
|
|||
ignore = set(args.ignore.split(',')),
|
||||
quote = args.quote,
|
||||
skip_excluded = args.skip_excluded,
|
||||
hide_self = args.hide_self,
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -190,6 +194,8 @@ class BaseCmdPkgRelations(Cmd):
|
|||
'should be ignored together with their dependencies')
|
||||
parser.add_argument('--skip-excluded', action='store_true', default=False,
|
||||
help='Don\'t consider or output modules matching the os cascade in their [build].exclude config')
|
||||
parser.add_argument('--hide-self', action='store_true', default=False,
|
||||
help='Don\'t include any of the projects listed in <modules> in the output')
|
||||
parser.add_argument('--quote', action='store_true', default=False,
|
||||
help='Put double quotes around each listed dependency')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue