From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCHv2 3/3] generate-packages-dynamic-list: contrib script to generate disjunctive PACKAGES_DYNAMIC for each pack base/good/bad/ugly
Date: Wed, 6 Apr 2011 18:12:23 +0200 [thread overview]
Message-ID: <1302106343-5331-3-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <1302106343-5331-1-git-send-email-Martin.Jansa@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
.../gstreamer/generate-packages-dynamic-list.sh | 60 ++++++++++++++++++++
1 files changed, 60 insertions(+), 0 deletions(-)
create mode 100755 contrib/gstreamer/generate-packages-dynamic-list.sh
diff --git a/contrib/gstreamer/generate-packages-dynamic-list.sh b/contrib/gstreamer/generate-packages-dynamic-list.sh
new file mode 100755
index 0000000..932aca4
--- /dev/null
+++ b/contrib/gstreamer/generate-packages-dynamic-list.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# PATH to tmpdir
+TMPDIR=tmp
+
+if [ $# -lt 1 ] ; then
+ echo "Usage: $0 path/to/recipe.bb"
+ exit 1
+fi
+
+if [ $# -eq 2 ] ; then
+ TMPDIR=$2
+fi
+
+if [ ! -d ${TMPDIR} ] ; then
+ echo "TMPDIR '${TMPDIR}' does not exist, update TMPDIR in script or use 2nd parameter"
+ exit 2
+fi
+
+RECIPE=$1
+
+if grep PACKAGES_DYNAMIC ${RECIPE} >/dev/null; then
+ echo "${RECIPE} already has PACKAGES_DYNAMIC defined, please remove it first"
+ exit 3
+fi
+
+# force old behavior spliting all
+echo 'PACKAGES_DYNAMIC = "gst-plugin-*"' >> ${RECIPE}
+
+echo "Cleaning ${RECIPE}"
+# don't know better way to get right WORKDIR from shell, we need to clean it anyways
+WORKDIR=`bitbake -c clean -v -b ${RECIPE} | grep "NOTE: removing work" | sed 's/NOTE: removing //g'`
+
+TMPDIR_PKGS=${TMPDIR}/${WORKDIR}/packages-split/
+echo "Packages are expected in ${TMPDIR_PKGS}"
+
+echo "Building ${RECIPE}"
+# -c build because some people use rm_work
+bitbake -c build -b ${RECIPE}
+
+if [ $? -ne 0 ] ; then
+ echo "${RECIPE} build failed, fix build first"
+ sed -i '/^PACKAGES_DYNAMIC = "gst-plugin-\*"$/d' ${RECIPE}
+ exit 4
+fi
+
+
+if ls -1d ${TMPDIR_PKGS}/gst-plugin-*-dev | grep gst-plugin-.*-dev >/dev/null; then
+ # replace temporary PACKAGES_DYNAMIC spliting all with list of created packages
+ sed -i '/^PACKAGES_DYNAMIC = "gst-plugin-\*"$/d' ${RECIPE}
+ echo '' >> ${RECIPE}
+ echo 'PACKAGES_DYNAMIC = "\' >> ${RECIPE}
+ ls -1d ${TMPDIR_PKGS}/gst-plugin-*-dev | grep gst-plugin-.*-dev| sed "s#${TMPDIR_PKGS}/\(.*\)-dev#\1* \\\#g" >> ${RECIPE}
+ echo '"' >> ${RECIPE}
+ echo "${RECIPE} PACKAGES_DYNAMIC were hopefully updated"
+else
+ echo "No directories found ${TMPDIR_PKGS}/gst-plugin-*-dev"
+ exit 5
+fi
+
--
1.7.4.1
next prev parent reply other threads:[~2011-04-06 16:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 12:41 [PATCH 1/2] gstreamer: move old versions to obsolete Martin Jansa
2011-03-17 12:41 ` [PATCH 2/2] gst-plugins: define disjunctive PACKAGES_DYNAMIC for each pack base/good/bad/ugly Martin Jansa
2011-03-17 13:30 ` Koen Kooi
2011-03-17 13:52 ` Martin Jansa
2011-04-06 16:12 ` [PATCHv2 1/3] gst-plugins-good-0.10.26: move to obsolete Martin Jansa
2011-04-06 16:12 ` [PATCHv2 2/3] gst-plugins: define disjunctive PACKAGES_DYNAMIC for each pack base/good/bad/ugly Martin Jansa
2011-04-06 16:26 ` Robert Foerster
2011-04-10 14:29 ` Mike Westerhof
2011-04-06 16:12 ` Martin Jansa [this message]
2011-04-10 14:29 ` [PATCHv2 3/3] generate-packages-dynamic-list: contrib script to generate " Mike Westerhof
2011-03-17 13:43 ` [PATCH 2/2] gst-plugins: define " Phil Blundell
2011-03-17 12:47 ` [PATCH 1/2] gstreamer: move old versions to obsolete Koen Kooi
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=1302106343-5331-3-git-send-email-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-devel@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