mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-23 06:30:38 +01:00
projects.py: Add support for explicitly specifying version in pkg.required
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
504fc65f47
commit
de4a08f3d4
1 changed files with 4 additions and 0 deletions
|
|
@ -292,10 +292,14 @@ def cmd_pkg_requires(args_):
|
||||||
if len(dep) == 3:
|
if len(dep) == 3:
|
||||||
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
||||||
version = get_value(dep_project, 'version', '')
|
version = get_value(dep_project, 'version', '')
|
||||||
|
version_pattern=re.compile("[0-9-.]*")
|
||||||
if dep[2] == 'VERSION':
|
if dep[2] == 'VERSION':
|
||||||
dep[2] = version.split('-')[0]
|
dep[2] = version.split('-')[0]
|
||||||
elif dep[2] == 'VERSION-REVISION':
|
elif dep[2] == 'VERSION-REVISION':
|
||||||
dep[2] = version
|
dep[2] = version
|
||||||
|
elif version_pattern.match(dep[2]):
|
||||||
|
# dep[2] = dep[2]
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown version specifier in " + spec)
|
raise Exception("Unknown version specifier in " + spec)
|
||||||
r.append(' '.join(dep))
|
r.append(' '.join(dep))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue