Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | We have an issue when ls segfaults in some cases [1] so it's |
| 2 | better to detect the failure at this level instead of continue |
| 3 | the build process. |
| 4 | |
| 5 | [YOCTO #8926] |
| 6 | |
| 7 | Upstream-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 | |
| 12 | Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> |
| 13 | --- |
| 14 | opkg-build | 8 ++++++++ |
| 15 | 1 file changed, 8 insertions(+) |
| 16 | |
| 17 | diff --git a/opkg-build b/opkg-build |
| 18 | index 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 | -- |
| 44 | 2.1.4 |
| 45 | |