summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-03-31 15:27:01 -0600
committerAlejandro del Castillo <alejandro.delcastillo@ni.com>2016-04-11 11:05:25 -0500
commitcc0c6d9a7c789af857310be60d11b460ed04249e (patch)
treef1965c32af6bd33b29ae3ec0317bc8ae6f79ce37
parentfc6eb2913738f21ac58a5de2e2e0f34c954ffd34 (diff)
downloadopkg-utils-cc0c6d9a7c789af857310be60d11b460ed04249e.tar.gz
opkg-utils-cc0c6d9a7c789af857310be60d11b460ed04249e.tar.bz2
opkg-utils-cc0c6d9a7c789af857310be60d11b460ed04249e.zip
opkg-build: Exit when fail to list files.
We have an issue when ls segfaults in some cases [1] so it's better to detect the failure at this level instead of continue the build process. [YOCTO #8926] [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8926#c0 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
-rwxr-xr-xopkg-build8
1 files changed, 8 insertions, 0 deletions
diff --git a/opkg-build b/opkg-build
index 98008b6..a9ccad2 100755
--- a/opkg-build
+++ b/opkg-build
@@ -53,6 +53,10 @@ pkg_appears_sane() {
echo "*** Warning: The following files have names ending in '~'.
You probably want to remove them: " >&2
ls -ld $tilde_files
+ if [ $? -ne 0 ]; then
+ echo "*** Error: Fail to list files have names ending in '~'."
+ exit 1
+ fi
echo >&2
else
echo "*** Removing the following files: $tilde_files"
@@ -66,6 +70,10 @@ You probably want to remove them: " >&2
echo "*** Warning: The following files have a UID greater than 99.
You probably want to chown these to a system user: " >&2
ls -ld $large_uid_files
+ if [ $? -ne 0 ]; then
+ echo "*** Error: Fail to list files have a UID greater than 99."
+ exit 1
+ fi
echo >&2
fi