summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-04-01 10:27:10 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-03 15:51:37 +0100
commit66412abc00ae1db1d66824a55f18ebbf90b31ab5 (patch)
treea31b7110567f154330521a04b000f8a67947a902
parent6b8f8a47bd03f230c3b6ad58fb95b4dbc6959818 (diff)
downloadpoky-66412abc00ae1db1d66824a55f18ebbf90b31ab5.tar.gz
opkg-utils: 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 (From OE-Core rev: ce62112523f06f6655f673436247b4902ab0a9c3) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch45
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_git.bb4
2 files changed, 47 insertions, 2 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch
new file mode 100644
index 0000000000..6c66902efe
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch
@@ -0,0 +1,45 @@
1We have an issue when ls segfaults in some cases [1] so it's
2better to detect the failure at this level instead of continue
3the build process.
4
5[YOCTO #8926]
6
7Upstream-Status: Submitted [2]
8
9[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8926#c0
10[2] https://groups.google.com/forum/#!topic/opkg-devel/cmX02bgHZms
11
12Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
13---
14 opkg-build | 8 ++++++++
15 1 file changed, 8 insertions(+)
16
17diff --git a/opkg-build b/opkg-build
18index 98008b6..a9ccad2 100755
19--- a/opkg-build
20+++ b/opkg-build
21@@ -53,6 +53,10 @@ pkg_appears_sane() {
22 echo "*** Warning: The following files have names ending in '~'.
23 You probably want to remove them: " >&2
24 ls -ld $tilde_files
25+ if [ $? -ne 0 ]; then
26+ echo "*** Error: Fail to list files have names ending in '~'."
27+ exit 1
28+ fi
29 echo >&2
30 else
31 echo "*** Removing the following files: $tilde_files"
32@@ -66,6 +70,10 @@ You probably want to remove them: " >&2
33 echo "*** Warning: The following files have a UID greater than 99.
34 You probably want to chown these to a system user: " >&2
35 ls -ld $large_uid_files
36+ if [ $? -ne 0 ]; then
37+ echo "*** Error: Fail to list files have a UID greater than 99."
38+ exit 1
39+ fi
40 echo >&2
41 fi
42
43--
442.1.4
45
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 1bc561c08a..22f45a1d8d 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -10,8 +10,8 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu
10SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a" 10SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
11PV = "0.1.8+git${SRCPV}" 11PV = "0.1.8+git${SRCPV}"
12 12
13SRC_URI = "git://git.yoctoproject.org/opkg-utils" 13SRC_URI = "git://git.yoctoproject.org/opkg-utils \
14 14 file://opkg-build-Exit-when-fail-to-list-files.patch"
15SRC_URI_append_class-native = " file://tar_ignore_error.patch" 15SRC_URI_append_class-native = " file://tar_ignore_error.patch"
16 16
17S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"