cmds.projects.BaseCmdPkgRelations: Remove --no-version

Merge --no-version into the --syntax option as "--syntax names-only"
to remove redundancy.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-15 12:25:11 +01:00
commit 57f204ccaa
2 changed files with 3 additions and 5 deletions

View file

@ -42,7 +42,7 @@ REMOTE_GIT_URL = ssh://$(JANWARE_USER_PREFIX)git.janware.com$(REMO
ifneq ($(DONT_CHECK_PREREQ_DONE),true)
ifndef PREREQ
PREREQ := $(call proj_query,pkg-requires --no-version --no-subpackages --subsections=jw --delimiter=' ' build $(PROJECT))
PREREQ := $(call proj_query,pkg-requires --no-subpackages --subsections=jw --syntax names-only --delimiter=' ' build $(PROJECT))
endif
ifndef PREREQ_DIRS
PREREQ_DIRS := $(call proj_query,proj-dir $(PREREQ))

View file

@ -42,7 +42,7 @@ class BaseCmdPkgRelations(Cmd):
deps = value.split(',')
for spec in deps:
dep = re.split('([=><]+)', spec)
if args.no_version:
if args.syntax == 'names-only':
dep = dep[:1]
dep = list(map(str.strip, dep))
dep_name = re.sub('-dev$|-devel$|-run$', '', dep[0])
@ -127,13 +127,11 @@ class BaseCmdPkgRelations(Cmd):
parser.add_argument('module', nargs='*', help='Modules')
parser.add_argument('-p', '--no-subpackages', action='store_true',
default=False, help='Cut -run and -devel from package names')
parser.add_argument('--no-version', action='store_true',
default=False, help='Don\'t report version information')
parser.add_argument('--dont-strip-revision', action='store_true',
default=False, help='Always treat VERSION macro as VERSION-REVISION')
parser.add_argument('--expand-semver-revision-range', action='store_true',
default=False, help='Always treat =VERSION macro as >= VERSION-0 and < (VERSION+1)-0')
parser.add_argument('--syntax', choices=['semver', 'debian'],
parser.add_argument('--syntax', choices=['semver', 'debian', 'names-only'],
default='semver', help='Output syntax')
parser.add_argument('--recursive', action='store_true',
default=False, help='Find dependencies recursively')