From: "Matthias Schiffer" <matthias.schiffer@ew.tq-group.com>
To: openembedded-core@lists.openembedded.org
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Subject: [PATCH 2/3] initscripts: populate-volatile.sh: run create_file synchronously
Date: Wed, 21 Jul 2021 16:10:15 +0200 [thread overview]
Message-ID: <fe07e5edab1a0db4320e64082ef838b1982cccbc.1626875447.git.matthias.schiffer@ew.tq-group.com> (raw)
In-Reply-To: <0fb2381b97f71a3469e6c5a0de98b2c3e7aa75c2.1626875447.git.matthias.schiffer@ew.tq-group.com>
In-Reply-To: <0fb2381b97f71a3469e6c5a0de98b2c3e7aa75c2.1626875447.git.matthias.schiffer@ew.tq-group.com>
The behavior of running create_file in the background was introduced in
d44816bedade ("initscripts: Populate volatile from existing file")
without further explanation. Besides its questionable benefit, this
causes actual issues:
- Not all create_file processes may have finished by the time the
initscript exits (or when it moves /etc/volatile.cache.build !)
- By making the order of commands nondeterminstic, it could hide
dependency issues where it was attempted to create files before their
containing directories
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---
.../initscripts/initscripts-1.0/populate-volatile.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index f8b42c6893..b56b72f833 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -201,7 +201,7 @@ apply_cfgfile() {
"f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
TSOURCE="$TLTARGET"
[ "${TSOURCE}" = "none" ] && TSOURCE=""
- create_file "${TNAME}" "${TSOURCE}" &
+ create_file "${TNAME}" "${TSOURCE}"
;;
"d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
mk_dir "${TNAME}"
--
2.17.1
next prev parent reply other threads:[~2021-07-21 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 14:10 [PATCH 1/3] initscripts: populate-volatile.sh: do not log to tty0 Matthias Schiffer
2021-07-21 14:10 ` Matthias Schiffer [this message]
2021-07-21 14:10 ` [PATCH 3/3] initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=true Matthias Schiffer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe07e5edab1a0db4320e64082ef838b1982cccbc.1626875447.git.matthias.schiffer@ew.tq-group.com \
--to=matthias.schiffer@ew.tq-group.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.