* [meta-oe] [PATCH] bash2dash conversion
@ 2016-09-18 2:52 zhe.he
2016-09-18 3:36 ` Christopher Larson
2016-09-19 14:35 ` Martin Jansa
0 siblings, 2 replies; 5+ messages in thread
From: zhe.he @ 2016-09-18 2:52 UTC (permalink / raw)
To: openembedded-devel
From: "Tim K. Chan" <nirvanatk@gmail.com>
Change bash style to dash style
Signed-off-by: Tim K. Chan <nirvanatk@gmail.com>
[Adjust context]
Signed-off-by: He Zhe <zhe.he@windriver.com>
---
.../iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb | 2 +-
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 6 ++++--
meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb | 2 +-
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb | 2 +-
meta-oe/recipes-support/postgresql/postgresql.inc | 2 +-
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
index 03f6459..17a5c1e 100644
--- a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
@@ -103,7 +103,7 @@ pkg_postinst_${PN}() {
if [ -e /etc/init.d/populate-volatile.sh ]; then
/etc/init.d/populate-volatile.sh update
- elif command -v systemd-tmpfiles >/dev/null; then
+ elif command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
fi
}
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index 3c3b4b5..2961b6b 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -33,7 +33,9 @@ do_configure() {
}
do_compile () {
- . ${CONFIG_SITE}
+ for CONFIG_SITE_ITEM in $CONFIG_SITE; do
+ . $CONFIG_SITE_ITEM
+ done
if [ X"$ac_cv_uint" = X"yes" ]; then
CFLAGS="${CFLAGS} -DHAVE_uint"
fi
@@ -68,7 +70,7 @@ do_install () {
pkg_postinst_${PN} () {
if [ -z "$D" ]; then
- if command -v systemd-tmpfiles >/dev/null; then
+ if command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/lmbench.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
index 3a3886b..ba0e2ac 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
+++ b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
@@ -108,7 +108,7 @@ do_install_append() {
pkg_postinst_${PN} () {
if [ -z "$D" ]; then
- if command -v systemd-tmpfiles >/dev/null; then
+ if command -p systemd-tmpfiles >/dev/null; then
systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
${sysconfdir}/init.d/populate-volatile.sh update
diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
index 84e465d..b1346b3 100644
--- a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
+++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
@@ -67,7 +67,7 @@ pkg_postinst_${PN} () {
if [ x"$D" != "x" ]; then
OPTS="--root=$D"
- if type systemctl >/dev/null 2>/dev/null; then
+ if command -p systemctl >/dev/null 2>/dev/null; then
systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
fi
exit 1
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc b/meta-oe/recipes-support/postgresql/postgresql.inc
index e473f58..9592c79 100644
--- a/meta-oe/recipes-support/postgresql/postgresql.inc
+++ b/meta-oe/recipes-support/postgresql/postgresql.inc
@@ -179,7 +179,7 @@ do_install_append() {
# install COPYRIGHT README HISTORY
install -d -m 0755 ${D}${docdir}/${BPN}
- for i in ${B}/{COPYRIGHT,README,HISTORY} ${B}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do
+ for i in ${B}/COPYRIGHT ${B}/README ${B}/HISTORY ${B}/doc/KNOWN_BUGS ${B}/doc/MISSING_FEATURES ${B}/doc/README* ${B}/doc/bug.template; do
[ -f $i ] && install $i ${D}${docdir}/${BPN}
done
--
2.8.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [meta-oe] [PATCH] bash2dash conversion
2016-09-18 2:52 [meta-oe] [PATCH] bash2dash conversion zhe.he
@ 2016-09-18 3:36 ` Christopher Larson
2016-09-19 11:01 ` Otavio Salvador
2016-09-19 14:35 ` Martin Jansa
1 sibling, 1 reply; 5+ messages in thread
From: Christopher Larson @ 2016-09-18 3:36 UTC (permalink / raw)
To: Openembedded Discussion
The purpose of ‘command’ is to *run* a command, not check if it’s
available, and ‘type’ is mandated in SuSv3/SuSv4/POSIX. If dash doesn’t
provide it, it’s broken.
On Sat, Sep 17, 2016 at 7:52 PM, <zhe.he@windriver.com> wrote:
> From: "Tim K. Chan" <nirvanatk@gmail.com>
>
> Change bash style to dash style
>
> Signed-off-by: Tim K. Chan <nirvanatk@gmail.com>
> [Adjust context]
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
> .../iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb | 2
> +-
> meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 6
> ++++--
> meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb | 2
> +-
> meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb | 2
> +-
> meta-oe/recipes-support/postgresql/postgresql.inc | 2
> +-
> 5 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/
> iscsi-initiator-utils_2.0-873.bb b/meta-networking/recipes-
> daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
> index 03f6459..17a5c1e 100644
> --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/
> iscsi-initiator-utils_2.0-873.bb
> +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/
> iscsi-initiator-utils_2.0-873.bb
> @@ -103,7 +103,7 @@ pkg_postinst_${PN}() {
>
> if [ -e /etc/init.d/populate-volatile.sh ]; then
> /etc/init.d/populate-volatile.sh update
> - elif command -v systemd-tmpfiles >/dev/null; then
> + elif command -p systemd-tmpfiles >/dev/null; then
> systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
> fi
> }
> diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> index 3c3b4b5..2961b6b 100644
> --- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> +++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> @@ -33,7 +33,9 @@ do_configure() {
> }
>
> do_compile () {
> - . ${CONFIG_SITE}
> + for CONFIG_SITE_ITEM in $CONFIG_SITE; do
> + . $CONFIG_SITE_ITEM
> + done
> if [ X"$ac_cv_uint" = X"yes" ]; then
> CFLAGS="${CFLAGS} -DHAVE_uint"
> fi
> @@ -68,7 +70,7 @@ do_install () {
>
> pkg_postinst_${PN} () {
> if [ -z "$D" ]; then
> - if command -v systemd-tmpfiles >/dev/null; then
> + if command -p systemd-tmpfiles >/dev/null; then
> systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/
> lmbench.conf
> elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
> ${sysconfdir}/init.d/populate-volatile.sh update
> diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> index 3a3886b..ba0e2ac 100644
> --- a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> +++ b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> @@ -108,7 +108,7 @@ do_install_append() {
>
> pkg_postinst_${PN} () {
> if [ -z "$D" ]; then
> - if command -v systemd-tmpfiles >/dev/null; then
> + if command -p systemd-tmpfiles >/dev/null; then
> systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf
> elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
> ${sysconfdir}/init.d/populate-volatile.sh update
> diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> index 84e465d..b1346b3 100644
> --- a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> +++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> @@ -67,7 +67,7 @@ pkg_postinst_${PN} () {
>
> if [ x"$D" != "x" ]; then
> OPTS="--root=$D"
> - if type systemctl >/dev/null 2>/dev/null; then
> + if command -p systemctl >/dev/null 2>/dev/null; then
> systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
> fi
> exit 1
> diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc
> b/meta-oe/recipes-support/postgresql/postgresql.inc
> index e473f58..9592c79 100644
> --- a/meta-oe/recipes-support/postgresql/postgresql.inc
> +++ b/meta-oe/recipes-support/postgresql/postgresql.inc
> @@ -179,7 +179,7 @@ do_install_append() {
>
> # install COPYRIGHT README HISTORY
> install -d -m 0755 ${D}${docdir}/${BPN}
> - for i in ${B}/{COPYRIGHT,README,HISTORY}
> ${B}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do
> + for i in ${B}/COPYRIGHT ${B}/README ${B}/HISTORY ${B}/doc/KNOWN_BUGS
> ${B}/doc/MISSING_FEATURES ${B}/doc/README* ${B}/doc/bug.template; do
> [ -f $i ] && install $i ${D}${docdir}/${BPN}
> done
>
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [meta-oe] [PATCH] bash2dash conversion
2016-09-18 3:36 ` Christopher Larson
@ 2016-09-19 11:01 ` Otavio Salvador
2016-09-27 6:19 ` He Zhe
0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2016-09-19 11:01 UTC (permalink / raw)
To: OpenEmbedded Devel List
On Sun, Sep 18, 2016 at 12:36 AM, Christopher Larson
<clarson@kergoth.com> wrote:
> The purpose of ‘command’ is to *run* a command, not check if it’s
> available, and ‘type’ is mandated in SuSv3/SuSv4/POSIX. If dash doesn’t
> provide it, it’s broken.
It provides it and works:
% dash
$ if type dash; then echo "dash is found and working"; else echo "Error"; fi
dash is /bin/dash
dash is found and working
$
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-oe] [PATCH] bash2dash conversion
2016-09-19 11:01 ` Otavio Salvador
@ 2016-09-27 6:19 ` He Zhe
0 siblings, 0 replies; 5+ messages in thread
From: He Zhe @ 2016-09-27 6:19 UTC (permalink / raw)
To: openembedded-devel; +Cc: Christopher Larson, otavio.salvador
Thank you for your careful review and Otavio's test. I'll send v2 soon.
Zhe
On 09/19/2016 07:01 PM, Otavio Salvador wrote:
> On Sun, Sep 18, 2016 at 12:36 AM, Christopher Larson
> <clarson@kergoth.com> wrote:
>> The purpose of ‘command’ is to *run* a command, not check if it’s
>> available, and ‘type’ is mandated in SuSv3/SuSv4/POSIX. If dash doesn’t
>> provide it, it’s broken.
> It provides it and works:
>
> % dash
> $ if type dash; then echo "dash is found and working"; else echo "Error"; fi
> dash is /bin/dash
> dash is found and working
> $
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-oe] [PATCH] bash2dash conversion
2016-09-18 2:52 [meta-oe] [PATCH] bash2dash conversion zhe.he
2016-09-18 3:36 ` Christopher Larson
@ 2016-09-19 14:35 ` Martin Jansa
1 sibling, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2016-09-19 14:35 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 6171 bytes --]
On Sun, Sep 18, 2016 at 10:52:59AM +0800, zhe.he@windriver.com wrote:
> From: "Tim K. Chan" <nirvanatk@gmail.com>
>
> Change bash style to dash style
>
> Signed-off-by: Tim K. Chan <nirvanatk@gmail.com>
> [Adjust context]
> Signed-off-by: He Zhe <zhe.he@windriver.com>
2016-09-19 16:30:09 URL:https://patchwork.openembedded.org/patch/131797/mbox/ [4648] -> "pw-am-131797.patch" [1]
Applying: bash2dash conversion
.git/rebase-apply/patch:32: space before tab in indent.
. $CONFIG_SITE_ITEM
error: meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb: does not exist in index
Patch failed at 0001 bash2dash conversion
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
2016-09-19 16:30:09 URL:https://patchwork.openembedded.org/patch/131797/mbox/ [4648] -> "pw-am-131797.patch" [1]
Applying: bash2dash conversion
.git/rebase-apply/patch:32: space before tab in indent.
. $CONFIG_SITE_ITEM
error: meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb: does not exist in index
Patch failed at 0001 bash2dash conversion
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
> ---
> .../iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb | 2 +-
> meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb | 6 ++++--
> meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb | 2 +-
> meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb | 2 +-
> meta-oe/recipes-support/postgresql/postgresql.inc | 2 +-
> 5 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
> index 03f6459..17a5c1e 100644
> --- a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
> +++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
> @@ -103,7 +103,7 @@ pkg_postinst_${PN}() {
>
> if [ -e /etc/init.d/populate-volatile.sh ]; then
> /etc/init.d/populate-volatile.sh update
> - elif command -v systemd-tmpfiles >/dev/null; then
> + elif command -p systemd-tmpfiles >/dev/null; then
> systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/iscsi.conf
> fi
> }
> diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> index 3c3b4b5..2961b6b 100644
> --- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> +++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
> @@ -33,7 +33,9 @@ do_configure() {
> }
>
> do_compile () {
> - . ${CONFIG_SITE}
> + for CONFIG_SITE_ITEM in $CONFIG_SITE; do
> + . $CONFIG_SITE_ITEM
> + done
> if [ X"$ac_cv_uint" = X"yes" ]; then
> CFLAGS="${CFLAGS} -DHAVE_uint"
> fi
> @@ -68,7 +70,7 @@ do_install () {
>
> pkg_postinst_${PN} () {
> if [ -z "$D" ]; then
> - if command -v systemd-tmpfiles >/dev/null; then
> + if command -p systemd-tmpfiles >/dev/null; then
> systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/lmbench.conf
> elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
> ${sysconfdir}/init.d/populate-volatile.sh update
> diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> index 3a3886b..ba0e2ac 100644
> --- a/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> +++ b/meta-oe/recipes-connectivity/krb5/krb5_1.13.2.bb
> @@ -108,7 +108,7 @@ do_install_append() {
>
> pkg_postinst_${PN} () {
> if [ -z "$D" ]; then
> - if command -v systemd-tmpfiles >/dev/null; then
> + if command -p systemd-tmpfiles >/dev/null; then
> systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/krb5.conf
> elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
> ${sysconfdir}/init.d/populate-volatile.sh update
> diff --git a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> index 84e465d..b1346b3 100644
> --- a/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> +++ b/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb
> @@ -67,7 +67,7 @@ pkg_postinst_${PN} () {
>
> if [ x"$D" != "x" ]; then
> OPTS="--root=$D"
> - if type systemctl >/dev/null 2>/dev/null; then
> + if command -p systemctl >/dev/null 2>/dev/null; then
> systemctl $OPTS ${SYSTEMD_AUTO_ENABLE} ${SYSTEMD_SERVICE}
> fi
> exit 1
> diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc b/meta-oe/recipes-support/postgresql/postgresql.inc
> index e473f58..9592c79 100644
> --- a/meta-oe/recipes-support/postgresql/postgresql.inc
> +++ b/meta-oe/recipes-support/postgresql/postgresql.inc
> @@ -179,7 +179,7 @@ do_install_append() {
>
> # install COPYRIGHT README HISTORY
> install -d -m 0755 ${D}${docdir}/${BPN}
> - for i in ${B}/{COPYRIGHT,README,HISTORY} ${B}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do
> + for i in ${B}/COPYRIGHT ${B}/README ${B}/HISTORY ${B}/doc/KNOWN_BUGS ${B}/doc/MISSING_FEATURES ${B}/doc/README* ${B}/doc/bug.template; do
> [ -f $i ] && install $i ${D}${docdir}/${BPN}
> done
>
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-27 6:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-18 2:52 [meta-oe] [PATCH] bash2dash conversion zhe.he
2016-09-18 3:36 ` Christopher Larson
2016-09-19 11:01 ` Otavio Salvador
2016-09-27 6:19 ` He Zhe
2016-09-19 14:35 ` Martin Jansa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.