|
@@ -100,7 +100,7 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio):
|
|
|
def get_package_name(group, file_list):
|
|
def get_package_name(group, file_list):
|
|
|
package = None
|
|
package = None
|
|
|
|
|
|
|
|
- m = re.search(r"%s:(?P<package>.+?(?=\"))" % (AUTOVERSION_REGEXP), group)
|
|
|
|
|
|
|
+ m = re.search(r"%s:(?P<package>.+?(?=[\"@]))" % (AUTOVERSION_REGEXP), group)
|
|
|
if m:
|
|
if m:
|
|
|
package = m.group('package')
|
|
package = m.group('package')
|
|
|
return (package, True)
|
|
return (package, True)
|
|
@@ -114,6 +114,12 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio):
|
|
|
|
|
|
|
|
return (package, False)
|
|
return (package, False)
|
|
|
|
|
|
|
|
|
|
+ def get_packagedata_key(group):
|
|
|
|
|
+ m = re.search(r"%s.+?(?<=@)(?P<key>.+?(?=\"))" % (AUTOVERSION_REGEXP), group)
|
|
|
|
|
+ if m:
|
|
|
|
|
+ return (m.group('key'), True)
|
|
|
|
|
+ return ("PV", False)
|
|
|
|
|
+
|
|
|
regexp = re.compile(r"\{[^\{]*%s.[^\}]*\}" % (AUTOVERSION_REGEXP))
|
|
regexp = re.compile(r"\{[^\{]*%s.[^\}]*\}" % (AUTOVERSION_REGEXP))
|
|
|
while True:
|
|
while True:
|
|
|
m = regexp.search(data)
|
|
m = regexp.search(data)
|
|
@@ -127,15 +133,19 @@ def swupdate_expand_auto_versions(d, s, list_for_cpio):
|
|
|
pkg_info = os.path.join(d.getVar('PKGDATA_DIR'), 'runtime-reverse', package)
|
|
pkg_info = os.path.join(d.getVar('PKGDATA_DIR'), 'runtime-reverse', package)
|
|
|
pkgdata = oe.packagedata.read_pkgdatafile(pkg_info)
|
|
pkgdata = oe.packagedata.read_pkgdatafile(pkg_info)
|
|
|
|
|
|
|
|
- if not "PV" in pkgdata.keys():
|
|
|
|
|
- bb.warn("\"PV\" not set for package %s - using \"1.0\"" % (package))
|
|
|
|
|
|
|
+ (key, key_defined) = get_packagedata_key(group)
|
|
|
|
|
+
|
|
|
|
|
+ if not key in pkgdata.keys():
|
|
|
|
|
+ bb.warn("\"%s\" not set for package %s - using \"1.0\"" % (key, package))
|
|
|
version = "1.0"
|
|
version = "1.0"
|
|
|
else:
|
|
else:
|
|
|
- version = pkgdata['PV'].split('+')[0]
|
|
|
|
|
|
|
+ version = pkgdata[key].split('+')[0]
|
|
|
|
|
|
|
|
replace_str = AUTO_VERSION_TAG
|
|
replace_str = AUTO_VERSION_TAG
|
|
|
if pkg_name_defined:
|
|
if pkg_name_defined:
|
|
|
replace_str = replace_str + ":" + package
|
|
replace_str = replace_str + ":" + package
|
|
|
|
|
+ if key_defined:
|
|
|
|
|
+ replace_str = replace_str + "@" + key
|
|
|
|
|
|
|
|
group = group.replace(replace_str, version)
|
|
group = group.replace(replace_str, version)
|
|
|
data = data[:m.start()] + group + data[m.end():]
|
|
data = data[:m.start()] + group + data[m.end():]
|