aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch
blob: 5cbb55a7dc718c85cf473d6476aed718d78f82b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 8e424296ce2af4a5a7392c38a31f8723f9b9fbda Mon Sep 17 00:00:00 2001
From: Denys Dmytriyenko <denys@ti.com>
Date: Thu, 7 Apr 2016 20:43:13 -0400
Subject: [PATCH] opkg-build: re-do find/ls code to not fail on filenames with
 spaces

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 opkg-build | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/opkg-build b/opkg-build
index a9ccad2..07305b2 100755
--- a/opkg-build
+++ b/opkg-build
@@ -6,7 +6,6 @@
 # 2003-04-25 rea@sr.unh.edu
 #   Updated to work on Familiar Pre0.7rc1, with busybox tar.
 #   Note it Requires: binutils-ar (since the busybox ar can't create)
-#   For UID debugging it needs a better "find".
 set -e
 
 version=1.0
@@ -47,12 +46,12 @@ pkg_appears_sane() {
 
 	PKG_ERROR=0
 
-	tilde_files=`find . -name '*~'`
+	tilde_files=`find . -name '*~' -ls -printf '\\\n'`
 	if [ -n "$tilde_files" ]; then
 	    if [ "$noclean" = "1" ]; then
 		echo "*** Warning: The following files have names ending in '~'.
 You probably want to remove them: " >&2
-		ls -ld $tilde_files
+		echo -e $tilde_files
 		if [ $? -ne 0 ]; then
 			echo "*** Error: Fail to list files have names ending in '~'."
 			exit 1
@@ -64,12 +63,12 @@ You probably want to remove them: " >&2
 	    fi
 	fi
 
-	large_uid_files=`find . -uid +99 || true`
+	large_uid_files=`find . -uid +99 -ls -printf '\\\n' || true`
 
 	if [ "$ogargs" = "" ]  && [ -n "$large_uid_files" ]; then
 		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
+		echo -e $large_uid_files
 		if [ $? -ne 0 ]; then
 			echo "*** Error: Fail to list files have a UID greater than 99."
 			exit 1
-- 
2.2.0