From 3dac9117e694eed54b72372d07fbd7cfb89b8c66 Mon Sep 17 00:00:00 2001 From: Wayne Ren Date: Thu, 10 Mar 2022 14:29:36 +0800 Subject: [PATCH] bash: fix the indent and bug in pkg_postinst * fix the indent from tab to spaces * fix the bug in pkg_postinst, which is executed in do_root_fs phase. so no need to add ${D} prefix. Signed-off-by: Wayne Ren --- meta-openeuler/recipes-labtools/bash/bash.inc | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/meta-openeuler/recipes-labtools/bash/bash.inc b/meta-openeuler/recipes-labtools/bash/bash.inc index 95625d9843c..10ce3b25d7c 100644 --- a/meta-openeuler/recipes-labtools/bash/bash.inc +++ b/meta-openeuler/recipes-labtools/bash/bash.inc @@ -20,38 +20,38 @@ RDEPENDS_${PN}-ptest += "make" PARALLEL_MAKE = "" do_configure () { - oe_runconf + oe_runconf } do_configure_prepend () { - rm -f ${S}/y.tab.c - if [ ! -e ${S}/acinclude.m4 ]; then - cat ${S}/aclocal.m4 > ${S}/acinclude.m4 - fi + rm -f ${S}/y.tab.c + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi } do_compile_ptest () { - oe_runmake buildtest + oe_runmake buildtest } do_install_append () { - # Move /usr/bin/bash to /bin/bash, if need - if [ "${base_bindir}" != "${bindir}" ]; then - mkdir -p ${D}${base_bindir} - mv ${D}${bindir}/bash ${D}${base_bindir} - fi + # Move /usr/bin/bash to /bin/bash, if need + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + mv ${D}${bindir}/bash ${D}${base_bindir} + fi } do_install_ptest () { - make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test - cp ${B}/Makefile ${D}${PTEST_PATH} - sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile + make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test + cp ${B}/Makefile ${D}${PTEST_PATH} + sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile } pkg_postinst_${PN} () { - mkdir -p $D${sysconfdir}/ || echo "" - touch $D${sysconfdir}/shells - grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells - grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells + mkdir -p ${sysconfdir}/ || echo "" + touch ${sysconfdir}/shells + grep -q "bin/bash" ${sysconfdir}/shells || echo /bin/bash >> ${sysconfdir}/shells + grep -q "bin/sh" ${sysconfdir}/shells || echo /bin/sh >> ${sysconfdir}/shells } FILES_${PN}-dev += "${libdir}/bash/*" -- Gitee