Skip to contentSkip to conversation

dbus-test: Replace cp -a with portable options

PATCH In review Khem Raj 2 participants 2 messages Mar 9, 2020 – Mar 10, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 dbus-test: Replace cp -a with portable options

-a option is linux specific

Errors like below are fixed when -a is used

bus/connection.h is owned by uid 1000, which is the same as t he user running bitbake. This may be due to host contamination

---
 meta/recipes-core/dbus/dbus-test_1.12.16.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus-test_1.12.16.bb +2 -2
index bea0e74ed0..91e2ba69d2 100644
@@ -70,11 +70,11 @@ do_install_ptest() {
 
 	install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
 
-	cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+	cp -R --no-dereference --preserve=mode,links ${B}/test/data ${D}${PTEST_PATH}/test
 	install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
 
 	install -d ${D}${PTEST_PATH}/test/.libs
-	cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+	cp -R --no-dereference --preserve=mode,links ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
 
 	# Remove build host references...
 	find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Khem Raj

-a option is linux specific

Is it?

Quoted 1 line

Errors like below are fixed when -a is used

Do you mean the errors are fixed when -a is _not_ used ?

Either way, the key fix here looks to be effectively removing --preserve=ownership from the cp command, not somehow making the cp command line arguments more portable as the subject implies. There are many similar fixes already in oe-core and meta-oe.

Quoted 34 lines

bus/connection.h is owned by uid 1000, which is the same as t he user running bitbake. This may be due to host contamination

---
 meta/recipes-core/dbus/dbus-test_1.12.16.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/dbus/dbus-test_1.12.16.bb +2 -3
index bea0e74ed0..91e2ba69d2 100644
@@ -70,11 +70,11 @@ do_install_ptest() {
 
        install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
 
-       cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+       cp -R --no-dereference --preserve=mode,links ${B}/test/data ${D}${PTEST_PATH}/test
        install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
 
        install -d ${D}${PTEST_PATH}/test/.libs
-       cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
+       cp -R --no-dereference --preserve=mode,links ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
 
        # Remove build host references...
        find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
--

2.25.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core