mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
doc, make, scripts: Add support for [pkg.conflicts.xxx]
Since the packaging machinery is pretty complicated, the information about conflicting packages had to be passed through many APIs. The last commit contained a patch which is left in the tree to have it in one file, it actually is identical to this commit's diff, though. Git would save me that quirk. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e52879215d
commit
c42e386c76
7 changed files with 100 additions and 54 deletions
4
doc/Makefile
Normal file
4
doc/Makefile
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
TOPDIR = ..
|
||||||
|
|
||||||
|
include $(TOPDIR)/make/proj.mk
|
||||||
|
include $(MODDIR)/make/cleandirs.mk
|
||||||
|
|
@ -73,7 +73,8 @@ DIST_PCKG_SRPM = $(BINARY_RPM) $(DIST_PCKG_DIR)/$(PCKG_RPM_SRC)
|
||||||
# to be replaced by pkg.sh
|
# to be replaced by pkg.sh
|
||||||
RPM_REQUIRES_DEVEL += $(call proj_query, pkg-requires --dont-expand-version-macros $(PROJ_QUERY_PKG_REQUIRES_EXTRA_ARGS) devel $(PROJECT))
|
RPM_REQUIRES_DEVEL += $(call proj_query, pkg-requires --dont-expand-version-macros $(PROJ_QUERY_PKG_REQUIRES_EXTRA_ARGS) devel $(PROJECT))
|
||||||
RPM_REQUIRES_RUN += $(call proj_query, pkg-requires --dont-expand-version-macros $(PROJ_QUERY_PKG_REQUIRES_EXTRA_ARGS) run $(PROJECT))
|
RPM_REQUIRES_RUN += $(call proj_query, pkg-requires --dont-expand-version-macros $(PROJ_QUERY_PKG_REQUIRES_EXTRA_ARGS) run $(PROJECT))
|
||||||
#RPM_REQUIRES_DEVEL += $(RPM_PROJECT)-run = __NEXT_VERSION__
|
RPM_CONFLICTS_DEVEL += $(call proj_query, pkg-conflicts --dont-expand-version-macros $(PROJ_QUERY_PKG_CONFLICTS_EXTRA_ARGS) devel $(PROJECT))
|
||||||
|
RPM_CONFLICTS_RUN += $(call proj_query, pkg-conflicts --dont-expand-version-macros $(PROJ_QUERY_PKG_CONFLICTS_EXTRA_ARGS) run $(PROJECT))
|
||||||
|
|
||||||
RPM_UPLOAD_OS_NAME = $(shell echo $(OS) | sed 's/-.*//')
|
RPM_UPLOAD_OS_NAME = $(shell echo $(OS) | sed 's/-.*//')
|
||||||
RPM_UPLOAD_OS_VERSION = $(shell echo $(OS) | sed 's/[^-]\+-//')
|
RPM_UPLOAD_OS_VERSION = $(shell echo $(OS) | sed 's/[^-]\+-//')
|
||||||
|
|
@ -88,8 +89,9 @@ include $(MODDIR)/make/tag-rules.mk
|
||||||
include $(MODDIR)/make/upload-rules.mk
|
include $(MODDIR)/make/upload-rules.mk
|
||||||
|
|
||||||
PKG_SH = $(PKG_SH_EXE) \
|
PKG_SH = $(PKG_SH_EXE) \
|
||||||
-N $(RPM_PROJECT) \
|
-N $(RPM_PROJECT) -P $(PROJECT) \
|
||||||
-R "$(RPM_REQUIRES_RUN)" -D "$(RPM_REQUIRES_DEVEL)" -P $(PROJECT) \
|
-R "$(RPM_REQUIRES_RUN)" -D "$(RPM_REQUIRES_DEVEL)" \
|
||||||
|
-X "$(RPM_CONFLICTS_RUN)" -Y "$(RPM_CONFLICTS_DEVEL)" \
|
||||||
-m $(MOD_SCRIPT_DIR) -a $(RPM_ARCH) -p $(DIST_PCKG_DIR) -F $(PKG_FORMAT) \
|
-m $(MOD_SCRIPT_DIR) -a $(RPM_ARCH) -p $(DIST_PCKG_DIR) -F $(PKG_FORMAT) \
|
||||||
-B $(RPM_UPLOAD_URLPREFIX) -A $(RPM_UPLOAD_FILE_ATTRIB)
|
-B $(RPM_UPLOAD_URLPREFIX) -A $(RPM_UPLOAD_FILE_ATTRIB)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ cfg_value global.subpackages | grep -q run && cat << EOT
|
||||||
Package: \$NAME-run
|
Package: \$NAME-run
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN"\`
|
Depends: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$REQUIRES_RUN"\`
|
||||||
|
# untested:
|
||||||
|
Conflicts: \`format_depends "\${shlibs:Depends}, \${misc:Depends}, \$CONFLICTS_RUN"\`
|
||||||
Description: `cfg_value summary`
|
Description: `cfg_value summary`
|
||||||
`cfg_value description | sed 's/^/ /'`
|
`cfg_value description | sed 's/^/ /'`
|
||||||
EOT
|
EOT
|
||||||
|
|
@ -64,6 +66,8 @@ cfg_value global.subpackages | grep -q devel && cat << EOT
|
||||||
Package: \$NAME-devel
|
Package: \$NAME-devel
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: \`format_depends "\$NAME-run = \$VERSION-\$RELEASE, \$REQUIRES_DEVEL"\`
|
Depends: \`format_depends "\$NAME-run = \$VERSION-\$RELEASE, \$REQUIRES_DEVEL"\`
|
||||||
|
# untested:
|
||||||
|
Conflicts: \`format_depends "\$NAME-run = \$VERSION-\$RELEASE, \$CONFLICTS_DEVEL"\`
|
||||||
Description: \$NAME Development Package
|
Description: \$NAME Development Package
|
||||||
Development tools for \$NAME-run
|
Development tools for \$NAME-run
|
||||||
EOT
|
EOT
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ cfg_value global.subpackages | grep -q run && _cat << EOT
|
||||||
|echo "Summary: `cfg_value summary`"
|
|echo "Summary: `cfg_value summary`"
|
||||||
|echo "Group: `cfg_value global.group`"
|
|echo "Group: `cfg_value global.group`"
|
||||||
|[ "\$REQUIRES_RUN" ] && echo "Requires: \$REQUIRES_RUN"
|
|[ "\$REQUIRES_RUN" ] && echo "Requires: \$REQUIRES_RUN"
|
||||||
|
|[ "\$CONFLICTS_RUN" ] && echo "Conflicts: \$CONFLICTS_RUN"
|
||||||
|echo "%description -n \$NAME-run"
|
|echo "%description -n \$NAME-run"
|
||||||
|echo "Runtime package"
|
|echo "Runtime package"
|
||||||
|echo ""
|
|echo ""
|
||||||
|
|
@ -60,6 +61,7 @@ cfg_value global.subpackages | grep -q devel && _cat << EOT
|
||||||
|echo "Summary: `cfg_value summary`, development package"
|
|echo "Summary: `cfg_value summary`, development package"
|
||||||
|echo "Group: `cfg_value global.group`"
|
|echo "Group: `cfg_value global.group`"
|
||||||
|[ "\$REQUIRES_DEVEL" ] && echo "Requires: \$REQUIRES_DEVEL"
|
|[ "\$REQUIRES_DEVEL" ] && echo "Requires: \$REQUIRES_DEVEL"
|
||||||
|
|[ "\$CONFLICTS_DEVEL" ] && echo "Conflicts: \$CONFLICTS_DEVEL"
|
||||||
|echo "%description -n \$NAME-devel"
|
|echo "%description -n \$NAME-devel"
|
||||||
|echo "Development package"
|
|echo "Development package"
|
||||||
|echo ""
|
|echo ""
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ usage()
|
||||||
[ "$1" ] && exit $1
|
[ "$1" ] && exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
set -- `getopt P:T:V:S:N:hR:D:d: "$@"`
|
set -- `getopt P:T:V:S:N:hR:D:X:Y:d: "$@"`
|
||||||
|
|
||||||
while [ "$1" != -- ]; do
|
while [ "$1" != -- ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
@ -42,12 +42,24 @@ case $1 in
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
-X)
|
||||||
|
while [ "`echo $2 | cut -c1`" != "-" ]; do
|
||||||
|
CONFLICTS_RUN="$CONFLICTS_RUN $2"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
;;
|
||||||
-D)
|
-D)
|
||||||
while [ "`echo $2 | cut -c1`" != "-" ]; do
|
while [ "`echo $2 | cut -c1`" != "-" ]; do
|
||||||
REQUIRES_DEVEL="$REQUIRES_DEVEL $2"
|
REQUIRES_DEVEL="$REQUIRES_DEVEL $2"
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
-Y)
|
||||||
|
while [ "`echo $2 | cut -c1`" != "-" ]; do
|
||||||
|
CONFLICTS_DEVEL="$CONFLICTS_DEVEL $2"
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
;;
|
||||||
-P)
|
-P)
|
||||||
PROJECT="$2"
|
PROJECT="$2"
|
||||||
shift;;
|
shift;;
|
||||||
|
|
@ -81,6 +93,7 @@ if [ -z "$NAME" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REQUIRES="$REQUIRES_RUN $REQUIRES_DEVEL"
|
REQUIRES="$REQUIRES_RUN $REQUIRES_DEVEL"
|
||||||
|
CONFLICTS="$CONFLICTS_RUN $CONFLICTS_DEVEL"
|
||||||
#if [ -n "$REQUIRES" ]; then
|
#if [ -n "$REQUIRES" ]; then
|
||||||
# REQUIRES_RUN=`echo $REQUIRES |
|
# REQUIRES_RUN=`echo $REQUIRES |
|
||||||
# sed -e '
|
# sed -e '
|
||||||
|
|
@ -96,6 +109,7 @@ REQUIRES="$REQUIRES_RUN $REQUIRES_DEVEL"
|
||||||
|
|
||||||
export \
|
export \
|
||||||
REQUIRES REQUIRES_RUN REQUIRES_DEVEL \
|
REQUIRES REQUIRES_RUN REQUIRES_DEVEL \
|
||||||
|
CONFLICTS CONFLICTS_RUN CONFLICTS_DEVEL \
|
||||||
TOPDIR \
|
TOPDIR \
|
||||||
PROJECT NAME \
|
PROJECT NAME \
|
||||||
SOURCE \
|
SOURCE \
|
||||||
|
|
|
||||||
|
|
@ -410,6 +410,8 @@ build_pkg()
|
||||||
local distribution=`os`
|
local distribution=`os`
|
||||||
local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
local RPM_REQUIRES_RUN=`echo $RPM_REQUIRES_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
||||||
local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
local RPM_REQUIRES_DEVEL=`echo $RPM_REQUIRES_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
||||||
|
local RPM_CONFLICTS_RUN=`echo $RPM_CONFLICTS_RUN | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
||||||
|
local RPM_CONFLICTS_DEVEL=`echo $RPM_CONFLICTS_DEVEL | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"`
|
||||||
|
|
||||||
# --- create source directory tree
|
# --- create source directory tree
|
||||||
create_empty_dir $src_tree "Source files compilation directory"
|
create_empty_dir $src_tree "Source files compilation directory"
|
||||||
|
|
@ -464,7 +466,9 @@ build_pkg()
|
||||||
-S $tar_archive \
|
-S $tar_archive \
|
||||||
-N $RPM_PROJECT \
|
-N $RPM_PROJECT \
|
||||||
-R "$RPM_REQUIRES_RUN" \
|
-R "$RPM_REQUIRES_RUN" \
|
||||||
|
-X "$RPM_CONFLICTS_RUN" \
|
||||||
-D "$RPM_REQUIRES_DEVEL" \
|
-D "$RPM_REQUIRES_DEVEL" \
|
||||||
|
-Y "$RPM_CONFLICTS_DEVEL" \
|
||||||
-P $PROJECT \
|
-P $PROJECT \
|
||||||
-d $distribution \
|
-d $distribution \
|
||||||
> $RPM_PROJECT.$deffmt
|
> $RPM_PROJECT.$deffmt
|
||||||
|
|
@ -909,7 +913,7 @@ SCM=cvs
|
||||||
[ -d .git ] && SCM=git
|
[ -d .git ] && SCM=git
|
||||||
|
|
||||||
|
|
||||||
opts='ht:p:m:N:R:D:P:a:F:B:A:'
|
opts='ht:p:m:N:R:D:X:Y:P:a:F:B:A:'
|
||||||
args=("$@")
|
args=("$@")
|
||||||
global_args=()
|
global_args=()
|
||||||
while [ "$1" ]; do
|
while [ "$1" ]; do
|
||||||
|
|
@ -949,10 +953,18 @@ while [ "$1" != -- -a "$1" != "$cmd" ] ; do
|
||||||
eval RPM_REQUIRES_RUN=\"$2\"
|
eval RPM_REQUIRES_RUN=\"$2\"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-X)
|
||||||
|
eval RPM_CONFLICTS_RUN=\"$2\"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-D)
|
-D)
|
||||||
eval RPM_REQUIRES_DEVEL=\"$2\"
|
eval RPM_REQUIRES_DEVEL=\"$2\"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-Y)
|
||||||
|
eval RPM_CONFLICTS_DEVEL=\"$2\"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-P)
|
-P)
|
||||||
eval PROJECT=\"$2\"
|
eval PROJECT=\"$2\"
|
||||||
shift
|
shift
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ def htdocs_dir(name):
|
||||||
return r
|
return r
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def pkg_requires_os_cascade():
|
def os_cascade():
|
||||||
os = get_os()
|
os = get_os()
|
||||||
name = re.sub('-.*', '', os)
|
name = re.sub('-.*', '', os)
|
||||||
# e.g. os, linux, suse, suse-tumbleweed
|
# e.g. os, linux, suse, suse-tumbleweed
|
||||||
|
|
@ -202,6 +202,55 @@ def get_modules_from_project_txt(names, section, keys, add_self, scope,
|
||||||
r.append(m)
|
r.append(m)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
def pkg_relations(rel_type, args_):
|
||||||
|
parser = argparse.ArgumentParser(description='pkg-' + rel_type)
|
||||||
|
# TODO: implement Vendor evaluation
|
||||||
|
|
||||||
|
parser.add_argument('--vendor', '-V', nargs='?', default='jw', help='Package Vendor')
|
||||||
|
parser.add_argument('flavour', help='Flavour')
|
||||||
|
parser.add_argument('module', nargs='*', help='Modules')
|
||||||
|
parser.add_argument('--dont-strip-revision', action='store_true',
|
||||||
|
default=False, help='Always treat VERSION macro as VERSION-REVISION')
|
||||||
|
parser.add_argument('--dont-expand-version-macros', action='store_true',
|
||||||
|
default=False, help='Don\'t expand VERSION and REVISION macros')
|
||||||
|
args=parser.parse_args(args_)
|
||||||
|
debug('flavour = ', args.flavour, ', vendor = ', args.vendor)
|
||||||
|
version_pattern=re.compile("[0-9-.]*")
|
||||||
|
subsecs = os_cascade()
|
||||||
|
subsecs.append('jw')
|
||||||
|
debug("subsecs = ", subsecs)
|
||||||
|
r = []
|
||||||
|
for s in subsecs:
|
||||||
|
for m in args.module:
|
||||||
|
value = get_value(m, 'pkg.' + rel_type + '.' + s, args.flavour)
|
||||||
|
if not value:
|
||||||
|
continue
|
||||||
|
deps = value.split(',')
|
||||||
|
for spec in deps:
|
||||||
|
dep = re.split('([=><]+)', spec)
|
||||||
|
for i, item in enumerate(dep):
|
||||||
|
dep[i] = item.strip()
|
||||||
|
if len(dep) == 3:
|
||||||
|
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
||||||
|
if args.dont_expand_version_macros and dep_project in args.module:
|
||||||
|
version = dep[2]
|
||||||
|
else:
|
||||||
|
version = get_value(dep_project, 'version', '')
|
||||||
|
if dep[2] == 'VERSION':
|
||||||
|
if args.dont_strip_revision:
|
||||||
|
dep[2] = version
|
||||||
|
else:
|
||||||
|
dep[2] = version.split('-')[0]
|
||||||
|
elif dep[2] == 'VERSION-REVISION':
|
||||||
|
dep[2] = version
|
||||||
|
elif version_pattern.match(dep[2]):
|
||||||
|
# dep[2] = dep[2]
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise Exception("Unknown version specifier in " + spec)
|
||||||
|
r.append(' '.join(dep))
|
||||||
|
print(', '.join(r))
|
||||||
|
|
||||||
def get_libname(names):
|
def get_libname(names):
|
||||||
vals = get_modules_from_project_txt(names, 'build', 'libname',
|
vals = get_modules_from_project_txt(names, 'build', 'libname',
|
||||||
scope = 1, add_self=False, names_only=True)
|
scope = 1, add_self=False, names_only=True)
|
||||||
|
|
@ -266,6 +315,7 @@ def cmd_test(args_):
|
||||||
args=parser.parse_args(args_)
|
args=parser.parse_args(args_)
|
||||||
print("blah = " + args.blah)
|
print("blah = " + args.blah)
|
||||||
|
|
||||||
|
# TODO: seems at least partly redundant to cmd_pkg_requires / pkg_relations
|
||||||
def cmd_requires_pkg(args_):
|
def cmd_requires_pkg(args_):
|
||||||
parser = argparse.ArgumentParser(description='requires-pkg')
|
parser = argparse.ArgumentParser(description='requires-pkg')
|
||||||
parser.add_argument('module', nargs='*', help='Modules')
|
parser.add_argument('module', nargs='*', help='Modules')
|
||||||
|
|
@ -275,7 +325,7 @@ def cmd_requires_pkg(args_):
|
||||||
debug("flavours = " + args.flavours)
|
debug("flavours = " + args.flavours)
|
||||||
deps = get_modules_from_project_txt(args.module, 'pkg.requires.jw', flavours,
|
deps = get_modules_from_project_txt(args.module, 'pkg.requires.jw', flavours,
|
||||||
scope = 2, add_self=True, names_only=True)
|
scope = 2, add_self=True, names_only=True)
|
||||||
subsecs = pkg_requires_os_cascade()
|
subsecs = os_cascade()
|
||||||
debug("subsecs = ", subsecs)
|
debug("subsecs = ", subsecs)
|
||||||
requires = []
|
requires = []
|
||||||
for s in subsecs:
|
for s in subsecs:
|
||||||
|
|
@ -290,7 +340,7 @@ def cmd_requires_pkg(args_):
|
||||||
print(r[1:])
|
print(r[1:])
|
||||||
|
|
||||||
def cmd_os_cascade(args_):
|
def cmd_os_cascade(args_):
|
||||||
print(' '.join(pkg_requires_os_cascade()))
|
print(' '.join(os_cascade()))
|
||||||
|
|
||||||
def cmd_ldlibpath(args_):
|
def cmd_ldlibpath(args_):
|
||||||
parser = argparse.ArgumentParser(description='ldlibpath')
|
parser = argparse.ArgumentParser(description='ldlibpath')
|
||||||
|
|
@ -349,6 +399,7 @@ def cmd_path(args_):
|
||||||
r = r + ':' + proj_dir(m) + '/bin'
|
r = r + ':' + proj_dir(m) + '/bin'
|
||||||
print(r[1:])
|
print(r[1:])
|
||||||
|
|
||||||
|
# TODO: seems at least partly redundant to cmd_pkg_requires / pkg_relations
|
||||||
def cmd_prereq(args_):
|
def cmd_prereq(args_):
|
||||||
parser = argparse.ArgumentParser(description='path')
|
parser = argparse.ArgumentParser(description='path')
|
||||||
parser.add_argument('flavour', help='Flavour')
|
parser.add_argument('flavour', help='Flavour')
|
||||||
|
|
@ -359,53 +410,10 @@ def cmd_prereq(args_):
|
||||||
print(' '.join(deps))
|
print(' '.join(deps))
|
||||||
|
|
||||||
def cmd_pkg_requires(args_):
|
def cmd_pkg_requires(args_):
|
||||||
parser = argparse.ArgumentParser(description='pkg-requires')
|
return pkg_relations("requires", args_)
|
||||||
# TODO: implement Vendor evaluation
|
|
||||||
|
|
||||||
parser.add_argument('--vendor', '-V', nargs='?', default='jw', help='Package Vendor')
|
def cmd_pkg_conflicts(args_):
|
||||||
parser.add_argument('flavour', help='Flavour')
|
return pkg_relations("conflicts", args_)
|
||||||
parser.add_argument('module', nargs='*', help='Modules')
|
|
||||||
parser.add_argument('--dont-strip-revision', action='store_true',
|
|
||||||
default=False, help='Always treat VERSION macro as VERSION-REVISION')
|
|
||||||
parser.add_argument('--dont-expand-version-macros', action='store_true',
|
|
||||||
default=False, help='Don\'t expand VERSION and REVISION macros')
|
|
||||||
args=parser.parse_args(args_)
|
|
||||||
debug('flavour = ', args.flavour, ', vendor = ', args.vendor)
|
|
||||||
version_pattern=re.compile("[0-9-.]*")
|
|
||||||
subsecs = pkg_requires_os_cascade()
|
|
||||||
subsecs.append('jw')
|
|
||||||
debug("subsecs = ", subsecs)
|
|
||||||
r = []
|
|
||||||
for s in subsecs:
|
|
||||||
for m in args.module:
|
|
||||||
value = get_value(m, 'pkg.requires.' + s, args.flavour)
|
|
||||||
if not value:
|
|
||||||
continue
|
|
||||||
deps = value.split(',')
|
|
||||||
for spec in deps:
|
|
||||||
dep = re.split('([=><]+)', spec)
|
|
||||||
for i, item in enumerate(dep):
|
|
||||||
dep[i] = item.strip()
|
|
||||||
if len(dep) == 3:
|
|
||||||
dep_project = re.sub(r'-devel$|-run$', '', dep[0])
|
|
||||||
if args.dont_expand_version_macros and dep_project in args.module:
|
|
||||||
version = dep[2]
|
|
||||||
else:
|
|
||||||
version = get_value(dep_project, 'version', '')
|
|
||||||
if dep[2] == 'VERSION':
|
|
||||||
if args.dont_strip_revision:
|
|
||||||
dep[2] = version
|
|
||||||
else:
|
|
||||||
dep[2] = version.split('-')[0]
|
|
||||||
elif dep[2] == 'VERSION-REVISION':
|
|
||||||
dep[2] = version
|
|
||||||
elif version_pattern.match(dep[2]):
|
|
||||||
# dep[2] = dep[2]
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise Exception("Unknown version specifier in " + spec)
|
|
||||||
r.append(' '.join(dep))
|
|
||||||
print(', '.join(r))
|
|
||||||
|
|
||||||
def cmd_proj_dir(args_):
|
def cmd_proj_dir(args_):
|
||||||
parser = argparse.ArgumentParser(description='proj-dir')
|
parser = argparse.ArgumentParser(description='proj-dir')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue