summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2017-03-25 18:03:55 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-27 10:08:34 (GMT)
commitf5187871ce03fc24cb0017cff1089a288f50a24f (patch)
tree83fa8184f091b1eacaecdb689609cdfdda2a6f5f
parent871363251a2de8fd701e80f711fbd3770dbf992e (diff)
downloadpoky-uninative-1.6.tar.gz
classes: Replace "if test" file tests with POSIX file testsuninative-1.6
In entire meta/classes/ directory, replace shell tests of the form "if test -? ..." with POSIX tests of the form "if [ -? ... (From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/distutils-tools.bbclass2
-rw-r--r--meta/classes/distutils.bbclass6
-rw-r--r--meta/classes/distutils3.bbclass2
-rw-r--r--meta/classes/go.bbclass4
-rw-r--r--meta/classes/gtk-doc.bbclass2
-rw-r--r--meta/classes/kernel-fitimage.bbclass10
-rw-r--r--meta/classes/kernel-uboot.bbclass2
-rw-r--r--meta/classes/kernel-uimage.bbclass2
-rw-r--r--meta/classes/populate_sdk_base.bbclass3
9 files changed, 16 insertions, 17 deletions
diff --git a/meta/classes/distutils-tools.bbclass b/meta/classes/distutils-tools.bbclass
index 3ef9cc5..6f2880e 100644
--- a/meta/classes/distutils-tools.bbclass
+++ b/meta/classes/distutils-tools.bbclass
@@ -63,7 +63,7 @@ distutils_do_install() {
63 # 63 #
64 # FIXME: Bandaid against wrong datadir computation 64 # FIXME: Bandaid against wrong datadir computation
65 # 65 #
66 if test -e ${D}${datadir}/share; then 66 if [ -e ${D}${datadir}/share ]; then
67 mv -f ${D}${datadir}/share/* ${D}${datadir}/ 67 mv -f ${D}${datadir}/share/* ${D}${datadir}/
68 fi 68 fi
69} 69}
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 857572d..e5abdd1 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -50,7 +50,7 @@ distutils_do_install() {
50 done 50 done
51 fi 51 fi
52 52
53 if test -e ${D}${sbindir}; then 53 if [ -e ${D}${sbindir} ]; then
54 for i in ${D}${sbindir}/* ; do \ 54 for i in ${D}${sbindir}/* ; do \
55 if [ ${PN} != "${BPN}-native" ]; then 55 if [ ${PN} != "${BPN}-native" ]; then
56 sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i 56 sed -i -e s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
@@ -65,13 +65,13 @@ distutils_do_install() {
65 # 65 #
66 # FIXME: Bandaid against wrong datadir computation 66 # FIXME: Bandaid against wrong datadir computation
67 # 67 #
68 if test -e ${D}${datadir}/share; then 68 if [ -e ${D}${datadir}/share ]; then
69 mv -f ${D}${datadir}/share/* ${D}${datadir}/ 69 mv -f ${D}${datadir}/share/* ${D}${datadir}/
70 rmdir ${D}${datadir}/share 70 rmdir ${D}${datadir}/share
71 fi 71 fi
72 72
73 # Fix backport modules 73 # Fix backport modules
74 if test -e ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py && test -e ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; then 74 if [ -e ${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py ] && [ -e ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py ]; then
75 rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; 75 rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py;
76 rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc; 76 rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc;
77 fi 77 fi
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index a6720c5..01ef72a 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -64,7 +64,7 @@ distutils3_do_install() {
64 # 64 #
65 # FIXME: Bandaid against wrong datadir computation 65 # FIXME: Bandaid against wrong datadir computation
66 # 66 #
67 if test -e ${D}${datadir}/share; then 67 if [ -e ${D}${datadir}/share ]; then
68 mv -f ${D}${datadir}/share/* ${D}${datadir}/ 68 mv -f ${D}${datadir}/share/* ${D}${datadir}/
69 rmdir ${D}${datadir}/share 69 rmdir ${D}${datadir}/share
70 fi 70 fi
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 42bbd73..85f71a2 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -36,7 +36,7 @@ GO_INSTALL ?= "${GO_IMPORT}/..."
36 36
37do_go_compile() { 37do_go_compile() {
38 GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go env 38 GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go env
39 if test -n "${GO_INSTALL}" ; then 39 if [ -n "${GO_INSTALL}" ]; then
40 GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install -v ${GO_INSTALL} 40 GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install -v ${GO_INSTALL}
41 fi 41 fi
42} 42}
@@ -61,7 +61,7 @@ do_go_install() {
61 61
62 chown -R root:root "${D}${GOROOT_FINAL}" 62 chown -R root:root "${D}${GOROOT_FINAL}"
63 63
64 if test -e "${D}${GOBIN_FINAL}" ; then 64 if [ -e "${D}${GOBIN_FINAL}" ]; then
65 install -d -m 0755 "${D}${bindir}" 65 install -d -m 0755 "${D}${bindir}"
66 find "${D}${GOBIN_FINAL}" ! -type d -print0 | xargs -r0 mv --target-directory="${D}${bindir}" 66 find "${D}${GOBIN_FINAL}" ! -type d -print0 | xargs -r0 mv --target-directory="${D}${bindir}"
67 rmdir -p "${D}${GOBIN_FINAL}" || true 67 rmdir -p "${D}${GOBIN_FINAL}" || true
diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass
index 297eac6..0ae2729 100644
--- a/meta/classes/gtk-doc.bbclass
+++ b/meta/classes/gtk-doc.bbclass
@@ -50,7 +50,7 @@ export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
50 50
51GIR_EXTRA_LIBS_PATH=\`find ${B} -name .libs| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH 51GIR_EXTRA_LIBS_PATH=\`find ${B} -name .libs| tr '\n' ':'\`\$GIR_EXTRA_LIBS_PATH
52 52
53if test -d ".libs"; then 53if [ -d ".libs" ]; then
54 $qemu_binary ".libs/\$@" 54 $qemu_binary ".libs/\$@"
55else 55else
56 $qemu_binary "\$@" 56 $qemu_binary "\$@"
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 2d344b5..8ae2eb6 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -96,7 +96,7 @@ fitimage_emit_section_kernel() {
96 kernel_csum="sha1" 96 kernel_csum="sha1"
97 97
98 ENTRYPOINT=${UBOOT_ENTRYPOINT} 98 ENTRYPOINT=${UBOOT_ENTRYPOINT}
99 if test -n "${UBOOT_ENTRYSYMBOL}"; then 99 if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
100 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ 100 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
101 awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'` 101 awk '$4=="${UBOOT_ENTRYSYMBOL}" {print $2}'`
102 fi 102 fi
@@ -339,7 +339,7 @@ fitimage_assemble() {
339 # 339 #
340 # Step 2: Prepare a DTB image section 340 # Step 2: Prepare a DTB image section
341 # 341 #
342 if test -n "${KERNEL_DEVICETREE}"; then 342 if [ -n "${KERNEL_DEVICETREE}" ]; then
343 dtbcount=1 343 dtbcount=1
344 for DTB in ${KERNEL_DEVICETREE}; do 344 for DTB in ${KERNEL_DEVICETREE}; do
345 if echo ${DTB} | grep -q '/dts/'; then 345 if echo ${DTB} | grep -q '/dts/'; then
@@ -359,7 +359,7 @@ fitimage_assemble() {
359 # 359 #
360 # Step 3: Prepare a setup section. (For x86) 360 # Step 3: Prepare a setup section. (For x86)
361 # 361 #
362 if test -e arch/${ARCH}/boot/setup.bin ; then 362 if [ -e arch/${ARCH}/boot/setup.bin ]; then
363 setupcount=1 363 setupcount=1
364 fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin 364 fitimage_emit_section_setup ${1} "${setupcount}" arch/${ARCH}/boot/setup.bin
365 fi 365 fi
@@ -383,7 +383,7 @@ fitimage_assemble() {
383 383
384 # Force the first Kernel and DTB in the default config 384 # Force the first Kernel and DTB in the default config
385 kernelcount=1 385 kernelcount=1
386 if test -n "${dtbcount}"; then 386 if [ -n "${dtbcount}" ]; then
387 dtbcount=1 387 dtbcount=1
388 fi 388 fi
389 389
@@ -392,7 +392,7 @@ fitimage_assemble() {
392 # 392 #
393 fitimage_emit_section_maint ${1} confstart 393 fitimage_emit_section_maint ${1} confstart
394 394
395 if test -n "${DTBS}"; then 395 if [ -n "${DTBS}" ]; then
396 i=1 396 i=1
397 for DTB in ${DTBS}; do 397 for DTB in ${DTBS}; do
398 fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`" 398 fitimage_emit_section_config ${1} "${kernelcount}" "${DTB}" "${ramdiskcount}" "${setupcount}" "`expr ${i} = ${dtbcount}`"
diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass
index 345e7f5..868e97d 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -1,5 +1,5 @@
1uboot_prep_kimage() { 1uboot_prep_kimage() {
2 if test -e arch/${ARCH}/boot/compressed/vmlinux ; then 2 if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
3 vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux" 3 vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
4 linux_suffix="" 4 linux_suffix=""
5 linux_comp="none" 5 linux_comp="none"
diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass
index 7e7185f..e2e9b63 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -23,7 +23,7 @@ do_uboot_mkimage() {
23 uboot_prep_kimage 23 uboot_prep_kimage
24 24
25 ENTRYPOINT=${UBOOT_ENTRYPOINT} 25 ENTRYPOINT=${UBOOT_ENTRYPOINT}
26 if test -n "${UBOOT_ENTRYSYMBOL}"; then 26 if [ -n "${UBOOT_ENTRYSYMBOL}" ]; then
27 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ 27 ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
28 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'` 28 awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
29 fi 29 fi
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index dd3cac5..563582e 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -246,8 +246,7 @@ populate_sdk_log_check() {
246 246
247 echo "log_check: Using $lf_path as logfile" 247 echo "log_check: Using $lf_path as logfile"
248 248
249 if test -e "$lf_path" 249 if [ -e "$lf_path" ]; then
250 then
251 ${IMAGE_PKGTYPE}_log_check $target $lf_path 250 ${IMAGE_PKGTYPE}_log_check $target $lf_path
252 else 251 else
253 echo "Cannot find logfile [$lf_path]" 252 echo "Cannot find logfile [$lf_path]"