mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
jw.pkg.cmds.projects.CmdRequiredOsPkg: Support --quote
--quote puts double quotation marks around the listed dependencies, protecting version requirements (>= 1.0) and parenthesis "perl(GD)" from the shell. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
26bfda109c
commit
2bbf5bd8e7
3 changed files with 12 additions and 8 deletions
|
|
@ -19,6 +19,8 @@ class CmdRequiredOsPkg(Cmd): # export
|
|||
parser.add_argument('--flavours', help='Dependency flavours', default='build')
|
||||
parser.add_argument('--skip-excluded', action='store_true', default=False,
|
||||
help='Output empty prerequisite list if module is excluded')
|
||||
parser.add_argument('--quote', action='store_true', default=False,
|
||||
help='Put double quotes around each listed dependency')
|
||||
|
||||
async def _run(self, args: Namespace) -> None:
|
||||
modules = args.module
|
||||
|
|
@ -41,6 +43,8 @@ class CmdRequiredOsPkg(Cmd): # export
|
|||
vals = self.app.collect_values(deps, 'pkg.requires.' + s, f)
|
||||
if vals:
|
||||
requires = requires + vals
|
||||
if args.quote:
|
||||
requires = [f'"{dep}"' for dep in requires]
|
||||
# TODO: add all not in build tree as -devel
|
||||
r = ''
|
||||
for m in requires:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue