[yocto] [PATCH] opkg-build: return error if Version is missing
Alejandro del Castillo
alejandro.delcastillo at ni.com
Mon May 2 16:11:47 PDT 2016
If Version is missing in a control file, opkg-build reports an error to
stdout, but returns 0. Fix condition on pkg_appears_sane to properly
return an error if Version is missing.
Suggested-by: Thomas de Schampheleire <patrickdepinguin at gmail.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo at ni.com>
---
opkg-build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/opkg-build b/opkg-build
index 82a0a51..ebbf5a3 100755
--- a/opkg-build
+++ b/opkg-build
@@ -86,8 +86,9 @@ You probably want to chown these to a system user: " >&2
pkg=`required_field Package`
[ "$?" -ne 0 ] && PKG_ERROR=1
- version=`required_field Version | sed 's/Version://; s/^.://g;'`
+ version=`required_field Version`
[ "$?" -ne 0 ] && PKG_ERROR=1
+ version=`echo $version | sed 's/Version://; s/^.://g;'`
arch=`required_field Architecture`
[ "$?" -ne 0 ] && PKG_ERROR=1
--
1.9.1
More information about the yocto
mailing list