mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 17:23:36 +02:00
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:
parent
cff63786e9
commit
57f204ccaa
2 changed files with 3 additions and 5 deletions
|
|
@ -42,7 +42,7 @@ REMOTE_GIT_URL = ssh://$(JANWARE_USER_PREFIX)git.janware.com$(REMO
|
||||||
|
|
||||||
ifneq ($(DONT_CHECK_PREREQ_DONE),true)
|
ifneq ($(DONT_CHECK_PREREQ_DONE),true)
|
||||||
ifndef PREREQ
|
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
|
endif
|
||||||
ifndef PREREQ_DIRS
|
ifndef PREREQ_DIRS
|
||||||
PREREQ_DIRS := $(call proj_query,proj-dir $(PREREQ))
|
PREREQ_DIRS := $(call proj_query,proj-dir $(PREREQ))
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class BaseCmdPkgRelations(Cmd):
|
||||||
deps = value.split(',')
|
deps = value.split(',')
|
||||||
for spec in deps:
|
for spec in deps:
|
||||||
dep = re.split('([=><]+)', spec)
|
dep = re.split('([=><]+)', spec)
|
||||||
if args.no_version:
|
if args.syntax == 'names-only':
|
||||||
dep = dep[:1]
|
dep = dep[:1]
|
||||||
dep = list(map(str.strip, dep))
|
dep = list(map(str.strip, dep))
|
||||||
dep_name = re.sub('-dev$|-devel$|-run$', '', dep[0])
|
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('module', nargs='*', help='Modules')
|
||||||
parser.add_argument('-p', '--no-subpackages', action='store_true',
|
parser.add_argument('-p', '--no-subpackages', action='store_true',
|
||||||
default=False, help='Cut -run and -devel from package names')
|
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',
|
parser.add_argument('--dont-strip-revision', action='store_true',
|
||||||
default=False, help='Always treat VERSION macro as VERSION-REVISION')
|
default=False, help='Always treat VERSION macro as VERSION-REVISION')
|
||||||
parser.add_argument('--expand-semver-revision-range', action='store_true',
|
parser.add_argument('--expand-semver-revision-range', action='store_true',
|
||||||
default=False, help='Always treat =VERSION macro as >= VERSION-0 and < (VERSION+1)-0')
|
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')
|
default='semver', help='Output syntax')
|
||||||
parser.add_argument('--recursive', action='store_true',
|
parser.add_argument('--recursive', action='store_true',
|
||||||
default=False, help='Find dependencies recursively')
|
default=False, help='Find dependencies recursively')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue