From: Rongqing Li <rongqing.li@windriver.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Cc: "Yang, Liezhi" <Liezhi.Yang@windriver.com>
Subject: Re: Could we build tar-replacement firstly and not parallel if tar-replacement is needed to build
Date: Tue, 7 Aug 2012 13:59:47 +0800 [thread overview]
Message-ID: <5020AED3.1020406@windriver.com> (raw)
In-Reply-To: <501FBD86.3090705@windriver.com>
Paste a RFC PATCH
[RFC PATCH 1/1] bitbake: compile tar-replacement firstly, and not parallel
Compiling tar-replacement or not is decided by version of host tar,
if the host tar version is lower than 1.23, Compiling tar-replacement
is needed.
When doing popoluate tar-replacement sysroot to write the tar to
sysroot, but writing is not finished. other packages probably
use the being written tar to unzip file, which will lead to failure
and report the below error:
"bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/tar: Text file busy "
Now we compile tar-replacement firstly and not parallel to ensure
that a being written tar command will not be used.
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
scripts/bitbake | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/scripts/bitbake b/scripts/bitbake
index 3772d82..eb6b144 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -134,7 +134,19 @@ if [ $buildpseudo -gt 0 ]; then
fi
done
done
- bitbake pseudo-native $TARTARGET $additionalopts -c populate_sysroot
+
+ if [ $needtar = "1" ]; then
+ NUM_THREAD_LINE=`grep -n "^\s*BB_NUMBER_THREADS" conf/local.conf
|awk -F':' '{print $1}'`
+ test -n "$NUM_THREAD_LINE" &&
+ sed -i ''"$NUM_THREAD_LINE"'s/^\s*BB_NUMBER_THREADS/#\0/g' conf/local.conf
+
+ bitbake $TARTARGET -c populate_sysroot
+
+ test -n "$NUM_THREAD_LINE" &&
+ sed -i
''"$NUM_THREAD_LINE"'s/^#\s*BB_NUMBER_THREADS/BB_NUMBER_THREADS/g'
conf/local.conf
+ fi
+
+ bitbake pseudo-native $additionalopts -c populate_sysroot
ret=$?
if [ "$ret" != "0" ]; then
exit 1
--
1.7.4.1
On 2012年08月06日 20:50, Rongqing Li wrote:
> Hi:
>
> Building failed several times when building tar-replacement-native is
> needed,
> The error log shows
> "bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/tar: Text
> file busy". this log proves "an attempt was made to execute a
> pure-procedure
> program that is currently open for writing."
>
>
> Before this error, tar-replacement do_populate_sysroot just starts,
> (tar-replacement-native-1.26-r2: task do_populate_sysroot: Started)
> After this error, we see tar-replacement do_populate_sysroot just
> finish.
>
> So I think the root cause is that do_populate_sysroot sqlite is using
> a tar command which being opened to written. in fact, all packages
> need tar to do_popolate_sysroot()
>
> I see building tar-replacement-native is started in bitbake file,
> could we build tar-replacement firstly, not parallel if needed.
>
>
>
> diff --git a/scripts/bitbake b/scripts/bitbake
> index 3772d82..1bb8fed 100755
> --- a/scripts/bitbake
> +++ b/scripts/bitbake
> @@ -134,7 +134,10 @@ if [ $buildpseudo -gt 0 ]; then
> fi
> done
> done
> - bitbake pseudo-native $TARTARGET $additionalopts -c populate_sysroot
> +
> + if [ $needptar = "1" ]; then
> + sed -i 's/BB_NUMBER_THREADS =/#BB_NUMBER_THREADS =/g'
> conf/local.conf
> + bitbake $TARTARGET
> + sed -i 's/#BB_NUMBER_THREADS =/BB_NUMBER_THREADS =/g'
> conf/local.conf
> + fi
> +
> + bitbake pseudo-native $additionalopts -c populate_sysroot
> ret=$?
> if [ "$ret" != "0" ]; then
> exit 1
>
>
> since building tar-replacement or not depends on host tar version, it is
> hard to add a tar dependence to any package, and I did not have a good way
> to fix this bug except the upper.
>
> Any advice and suggestion are welcome
>
>
--
Best Reagrds,
Roy | RongQing Li
next prev parent reply other threads:[~2012-08-07 6:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 12:50 Could we build tar-replacement firstly and not parallel if tar-replacement is needed to build Rongqing Li
2012-08-07 5:59 ` Rongqing Li [this message]
2012-08-07 7:41 ` Richard Purdie
2012-08-07 8:02 ` Rongqing Li
2012-08-07 8:57 ` Pascal Ouyang
2012-08-07 9:27 ` Rongqing Li
2012-08-07 9:03 ` Richard Purdie
2012-08-07 9:25 ` Rongqing Li
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=5020AED3.1020406@windriver.com \
--to=rongqing.li@windriver.com \
--cc=Liezhi.Yang@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox