[oe] [PATCH] package_deb.bbclass: make version acceptable for dpkg-deb.
Filip Zyzniewski
filip.zyzniewski at gmail.com
Tue Feb 22 22:02:37 UTC 2011
dpkg-deb does not like version numbers without digits:
NOTE: Running task 428 of 604 (ID: 14,
[...]/openembedded/recipes/linux-firmware/linux-firmware_git.bb,
do_package_write_deb)
dpkg-deb - error: (upstream) version (`git') doesn't contain any digits
dpkg-deb: 1 errors in control file
NOTE: package
linux-firmware-git-r1+gitr2fab48391fda8a914b55c8ac265eb3b6ee10ace8:
task do_package_write_deb: Started
This commit causes version numbers without digits to be appended with '0':
linux-firmware-agere_git0-r1+gitr2fab48391fda8a914b55c8ac265eb3b6ee10ace8_all.deb
Signed-off-by: Filip Zyzniewski <filip.zyzniewski at gmail.com>
---
classes/package_deb.bbclass | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index 87f31fa..f94771c 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -146,11 +146,14 @@ python do_package_deb () {
raise bb.build.FuncFailed("unable to open control file for writing.")
fields = []
+ version = bb.data.getVar('PKGV', d, 1)
+ if re.match('[^0-9]+$', version):
+ version = '%s0' % version
pe = bb.data.getVar('PE', d, 1)
if pe and int(pe) > 0:
- fields.append(["Version: %s:%s-%s\n", ['PE', 'PKGV', 'PKGR']])
+ fields.append(["Version: %%s:%s-%%s\n" % version, ['PE', 'PKGR']])
else:
- fields.append(["Version: %s-%s\n", ['PKGV', 'PKGR']])
+ fields.append(["Version: %s-%%s\n" % version, ['PKGR']])
fields.append(["Description: %s\n", ['DESCRIPTION']])
fields.append(["Section: %s\n", ['SECTION']])
fields.append(["Priority: %s\n", ['PRIORITY']])
--
1.7.1
More information about the Openembedded-devel
mailing list