]> code.ossystems Code Review - openembedded-core.git/blob
5cbb55a7dc718c85cf473d6476aed718d78f82b6
[openembedded-core.git] /
1 From 8e424296ce2af4a5a7392c38a31f8723f9b9fbda Mon Sep 17 00:00:00 2001
2 From: Denys Dmytriyenko <denys@ti.com>
3 Date: Thu, 7 Apr 2016 20:43:13 -0400
4 Subject: [PATCH] opkg-build: re-do find/ls code to not fail on filenames with
5  spaces
6
7 Signed-off-by: Denys Dmytriyenko <denys@ti.com>
8 ---
9  opkg-build | 9 ++++-----
10  1 file changed, 4 insertions(+), 5 deletions(-)
11
12 diff --git a/opkg-build b/opkg-build
13 index a9ccad2..07305b2 100755
14 --- a/opkg-build
15 +++ b/opkg-build
16 @@ -6,7 +6,6 @@
17  # 2003-04-25 rea@sr.unh.edu
18  #   Updated to work on Familiar Pre0.7rc1, with busybox tar.
19  #   Note it Requires: binutils-ar (since the busybox ar can't create)
20 -#   For UID debugging it needs a better "find".
21  set -e
22  
23  version=1.0
24 @@ -47,12 +46,12 @@ pkg_appears_sane() {
25  
26         PKG_ERROR=0
27  
28 -       tilde_files=`find . -name '*~'`
29 +       tilde_files=`find . -name '*~' -ls -printf '\\\n'`
30         if [ -n "$tilde_files" ]; then
31             if [ "$noclean" = "1" ]; then
32                 echo "*** Warning: The following files have names ending in '~'.
33  You probably want to remove them: " >&2
34 -               ls -ld $tilde_files
35 +               echo -e $tilde_files
36                 if [ $? -ne 0 ]; then
37                         echo "*** Error: Fail to list files have names ending in '~'."
38                         exit 1
39 @@ -64,12 +63,12 @@ You probably want to remove them: " >&2
40             fi
41         fi
42  
43 -       large_uid_files=`find . -uid +99 || true`
44 +       large_uid_files=`find . -uid +99 -ls -printf '\\\n' || true`
45  
46         if [ "$ogargs" = "" ]  && [ -n "$large_uid_files" ]; then
47                 echo "*** Warning: The following files have a UID greater than 99.
48  You probably want to chown these to a system user: " >&2
49 -               ls -ld $large_uid_files
50 +               echo -e $large_uid_files
51                 if [ $? -ne 0 ]; then
52                         echo "*** Error: Fail to list files have a UID greater than 99."
53                         exit 1
54 -- 
55 2.2.0
56