summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>2016-05-02 18:11:47 -0500
committerAlejandro del Castillo <alejandro.delcastillo@ni.com>2016-05-10 10:33:36 -0500
commit69aa4345f34dbd70b645d940a80fce0d5bfd8384 (patch)
tree9732da5dae6046a66bff8b316fb2639ebbaf0f86
parent2be44e399f855192543a422009f2ea60e11fc1bc (diff)
downloadopkg-utils-69aa4345f34dbd70b645d940a80fce0d5bfd8384.tar.gz
opkg-utils-69aa4345f34dbd70b645d940a80fce0d5bfd8384.tar.bz2
opkg-utils-69aa4345f34dbd70b645d940a80fce0d5bfd8384.zip
opkg-build: return error if Version is missing
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@gmail.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-rwxr-xr-xopkg-build3
1 files changed, 2 insertions, 1 deletions
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