diff options
author | Qiu Tingting <qiutt@fujitsu.com> | 2023-05-15 10:45:41 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-22 10:53:48 +0100 |
commit | ea989926ebbacbc13037ff4ea100fd96f69732da (patch) | |
tree | 830a7b77d0f349a3c3d84f28e24b80f39c2fb115 | |
parent | c23a17d8fb2606b7fa1cb0d1b4421ee54d67ca25 (diff) | |
download | poky-ea989926ebbacbc13037ff4ea100fd96f69732da.tar.gz |
e2fsprogs: Fix error SRCDIR when using usrmerge DISTRO_FEATURES
When build e2fsprogs ptest with usrmerge DISTRO_FEATURES,
in test_script and test_one scripts, value of SRCDIR has problem.
SRCDIR=/usr/usr/lib/e2fsprogs/ptest/test
ptest log
# ptest-runner e2fsprogs
START: ptest-runner
2022-12-17T11:08
BEGIN: /usr/lib/e2fsprogs/ptest
ls: cannot access '/usr/usr/lib/e2fsprogs/ptest/test/[a-zA-Z]_*': No such file or directory
./test_script: line 54: /usr/usr/lib/e2fsprogs/ptest/test/test_post: No such file or directory
DURATION: 0
END: /usr/lib/e2fsprogs/ptest
2022-12-17T11:08
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Reason
In Makefile.in, SRCDIR is set by prefix and libdir.
@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one
@echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script
prefix=/usr
libdir=/usr/lib (when usrmerge is set)
solution
Use PTEST_PATH to fix it.
(From OE-Core rev: 85e3b4f1d4b8734b0dd427d107a9f736bca9b7f7)
Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch index c3e46ce65f..20839b7286 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch | |||
@@ -22,7 +22,7 @@ index 8c4d2048..e021af32 100644 | |||
22 | @echo "HTREE=y" >> test_one | 22 | @echo "HTREE=y" >> test_one |
23 | @echo "QUOTA=y" >> test_one | 23 | @echo "QUOTA=y" >> test_one |
24 | - @echo "SRCDIR=@srcdir@" >> test_one | 24 | - @echo "SRCDIR=@srcdir@" >> test_one |
25 | + @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_one | 25 | + @echo "SRCDIR=@PTEST_PATH@/test" >> test_one |
26 | @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one | 26 | @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one |
27 | @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one | 27 | @echo "SIZEOF_TIME_T=@SIZEOF_TIME_T@" >> test_one |
28 | @echo "DD=@DD@" >>test_one | 28 | @echo "DD=@DD@" >>test_one |
@@ -31,7 +31,7 @@ index 8c4d2048..e021af32 100644 | |||
31 | @[ -f test_script ] && chmod u+w test_script || true | 31 | @[ -f test_script ] && chmod u+w test_script || true |
32 | @echo "#!/bin/sh" > test_script | 32 | @echo "#!/bin/sh" > test_script |
33 | - @echo "SRCDIR=@srcdir@" >> test_script | 33 | - @echo "SRCDIR=@srcdir@" >> test_script |
34 | + @echo "SRCDIR=${prefix}${libdir}/e2fsprogs/ptest/test" >> test_script | 34 | + @echo "SRCDIR=@PTEST_PATH@/test" >> test_script |
35 | @cat $(srcdir)/test_script.in >> test_script | 35 | @cat $(srcdir)/test_script.in >> test_script |
36 | @chmod +x-w test_script | 36 | @chmod +x-w test_script |
37 | 37 | ||
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb index d3786d6f4c..940b47c155 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.47.0.bb | |||
@@ -133,6 +133,7 @@ do_install_ptest() { | |||
133 | sed -e 's!../e2fsck/e2fsck!e2fsck!g' \ | 133 | sed -e 's!../e2fsck/e2fsck!e2fsck!g' \ |
134 | -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect* | 134 | -e 's!../misc/tune2fs!tune2fs!g' -i ${D}${PTEST_PATH}/test/*/expect* |
135 | sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script | 135 | sed -e 's!../e2fsck/e2fsck!${base_sbindir}/e2fsck!g' -i ${D}${PTEST_PATH}/test/*/script |
136 | sed -i "s#@PTEST_PATH@#${PTEST_PATH}#g" ${D}${PTEST_PATH}/test/test_script ${D}${PTEST_PATH}/test/test_one | ||
136 | 137 | ||
137 | # Remove various files | 138 | # Remove various files |
138 | find "${D}${PTEST_PATH}" -type f \ | 139 | find "${D}${PTEST_PATH}" -type f \ |