From: "Alexander Stohr" <Alexander.Stohr@gmx.de>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [Bitbake-dev] [PATCH] Add support for comma separated tasks with the -c option.
Date: Wed, 20 Oct 2010 18:09:43 +0200 [thread overview]
Message-ID: <20101020160943.161310@gmx.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
[forgot the cc]
-------- Original-Nachricht --------
Datum: Wed, 20 Oct 2010 18:08:11 +0200
Von: "Alexander Stohr" <Alexander.Stohr@gmx.de>
An:
Betreff: Re: [Bitbake-dev] [PATCH] Add support for comma separated tasks with the -c option.
as it is GPL...
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
i felt free to port that patch back to a smaller set of older versions.
it should apply as a patch to what its names says, the rest is again GPL:
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
regards, Alex.
PS: for the CC'ed one, thats the url for the original patch including a good reasoning along with a short description on how its operation is meant
https://lists.berlios.de/pipermail/bitbake-dev/2010-October/000719.html
--
GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
[-- Attachment #2: bitbake-1.8.12-comma-separated-tasks.patch --]
[-- Type: text/x-patch, Size: 4830 bytes --]
diff -Nru bitbake-1.8.12.orig/lib/bb/cooker.py bitbake-1.8.12/lib/bb/cooker.py
--- bitbake-1.8.12.orig/lib/bb/cooker.py 2008-12-14 20:37:23.000000000 +0100
+++ bitbake-1.8.12/lib/bb/cooker.py 2010-10-20 17:58:54.000000000 +0200
@@ -70,6 +70,7 @@
if not self.configuration.cmd:
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data) or "build"
+ self.configuration.cmd = self.configuration.cmd.split(",")
bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
if bbpkgs:
@@ -228,7 +229,7 @@
if data.getVarFlag( e, 'python', envdata ):
sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, data.getVar(e, envdata, 1)))
- def generateDotGraph( self, pkgs_to_build, ignore_deps ):
+ def generateDotGraph( self, pkgs_to_build, ignore_deps, task ):
"""
Generate a task dependency graph.
@@ -249,7 +250,8 @@
try:
for k in pkgs_to_build:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % self.configuration.cmd])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
except bb.providers.NoProvider:
sys.exit(1)
@@ -465,7 +467,7 @@
return False
return matches[0]
- def buildFile(self, buildfile):
+ def buildFile(self, buildfile, task):
"""
Build the file matching regexp buildfile
"""
@@ -475,6 +477,10 @@
if not fn:
return False
+ # If we are told to do the None task then query the default task
+ if (task == None):
+ task = self.configuration.cmd
+
# Load data into the cache for fn
self.bb_cache = bb.cache.init(self)
self.bb_cache.loadData(fn, self.configuration.data)
@@ -496,8 +502,9 @@
# Remove stamp for target if force mode active
if self.configuration.force:
- bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (self.configuration.cmd, fn))
- bb.build.del_stamp('do_%s' % self.configuration.cmd, self.configuration.data)
+ for t in task:
+ bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (t, fn))
+ bb.build.del_stamp('do_%s' % t, self.configuration.data)
# Setup taskdata structure
taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
@@ -507,7 +514,9 @@
bb.event.fire(bb.event.BuildStarted(buildname, [item], self.configuration.event_data))
# Execute the runqueue
- runlist = [[item, "do_%s" % self.configuration.cmd]]
+ runlist = []
+ for t in task:
+ runlist.append([item, "do_%s" % t])
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
rq.prepare_runqueue()
try:
@@ -522,7 +531,7 @@
bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
return True
- def buildTargets(self, targets):
+ def buildTargets(self, targets, task):
"""
Attempt to build the targets specified
"""
@@ -540,7 +549,8 @@
try:
for k in targets:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % self.configuration.cmd])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
except bb.providers.NoProvider:
sys.exit(1)
@@ -609,7 +619,7 @@
self.interactiveMode()
if self.configuration.buildfile is not None:
- if not self.buildFile(self.configuration.buildfile):
+ if not self.buildFile(self.configuration.buildfile, self.configuration.cmd):
sys.exit(1)
sys.exit(0)
@@ -638,10 +648,10 @@
pkgs_to_build.append(t)
if self.configuration.dot_graph:
- self.generateDotGraph( pkgs_to_build, self.configuration.ignored_dot_deps )
+ self.generateDotGraph( pkgs_to_build, self.configuration.ignored_dot_deps, self.configuration.cmd )
sys.exit( 0 )
- return self.buildTargets(pkgs_to_build)
+ return self.buildTargets(pkgs_to_build, self.configuration.cmd)
except KeyboardInterrupt:
bb.msg.note(1, bb.msg.domain.Collection, "KeyboardInterrupt - Build not completed.")
[-- Attachment #3: bitbake-1.8.18-comma-separated-tasks.patch --]
[-- Type: text/x-patch, Size: 4892 bytes --]
diff -Nru bitbake-1.8.18.orig/lib/bb/cooker.py bitbake-1.8.18/lib/bb/cooker.py
--- bitbake-1.8.18.orig/lib/bb/cooker.py 2009-11-10 16:22:07.000000000 +0100
+++ bitbake-1.8.18/lib/bb/cooker.py 2010-10-20 17:46:27.000000000 +0200
@@ -69,6 +69,7 @@
if not self.configuration.cmd:
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data) or "build"
+ self.configuration.cmd = self.configuration.cmd.split(",")
bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
@@ -227,7 +228,7 @@
if data.getVarFlag( e, 'python', envdata ):
sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, data.getVar(e, envdata, 1)))
- def generateDotGraph( self, pkgs_to_build, ignore_deps ):
+ def generateDotGraph( self, pkgs_to_build, ignore_deps, task ):
"""
Generate a task dependency graph.
@@ -248,7 +249,8 @@
try:
for k in pkgs_to_build:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % self.configuration.cmd])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
except bb.providers.NoProvider:
sys.exit(1)
@@ -464,7 +466,7 @@
return False
return matches[0]
- def buildFile(self, buildfile):
+ def buildFile(self, buildfile, task):
"""
Build the file matching regexp buildfile
"""
@@ -474,6 +476,10 @@
if not fn:
return False
+ # If we are told to do the None task then query the default task
+ if (task == None):
+ task = self.configuration.cmd
+
# Load data into the cache for fn and parse the loaded cache data
self.bb_cache = bb.cache.init(self)
self.status = bb.cache.CacheData()
@@ -492,8 +498,9 @@
# Remove stamp for target if force mode active
if self.configuration.force:
- bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (self.configuration.cmd, fn))
- bb.build.del_stamp('do_%s' % self.configuration.cmd, self.configuration.data)
+ for t in task:
+ bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (t, fn))
+ bb.build.del_stamp('do_%s' % t, self.configuration.data)
# Setup taskdata structure
taskdata = bb.taskdata.TaskData(self.configuration.abort, self.configuration.tryaltconfigs)
@@ -503,7 +510,9 @@
bb.event.fire(bb.event.BuildStarted(buildname, [item], self.configuration.event_data))
# Execute the runqueue
- runlist = [[item, "do_%s" % self.configuration.cmd]]
+ runlist = []
+ for t in task:
+ runlist.append([item, "do_%s" % t])
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
rq.prepare_runqueue()
try:
@@ -518,7 +527,7 @@
bb.event.fire(bb.event.BuildCompleted(buildname, [item], self.configuration.event_data, failures))
return True
- def buildTargets(self, targets):
+ def buildTargets(self, targets, task):
"""
Attempt to build the targets specified
"""
@@ -536,7 +545,8 @@
try:
for k in targets:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % self.configuration.cmd])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
except bb.providers.NoProvider:
sys.exit(1)
@@ -605,7 +615,7 @@
self.interactiveMode()
if self.configuration.buildfile is not None:
- if not self.buildFile(self.configuration.buildfile):
+ if not self.buildFile(self.configuration.buildfile, self.configuration.cmd):
sys.exit(1)
sys.exit(0)
@@ -634,10 +644,10 @@
pkgs_to_build.append(t)
if self.configuration.dot_graph:
- self.generateDotGraph( pkgs_to_build, self.configuration.ignored_dot_deps )
+ self.generateDotGraph( pkgs_to_build, self.configuration.ignored_dot_deps, self.configuration.cmd )
sys.exit( 0 )
- return self.buildTargets(pkgs_to_build)
+ return self.buildTargets(pkgs_to_build, self.configuration.cmd)
except KeyboardInterrupt:
bb.msg.note(1, bb.msg.domain.Collection, "KeyboardInterrupt - Build not completed.")
[-- Attachment #4: bitbake-1.10.0-comma-separated-tasks.patch --]
[-- Type: text/x-patch, Size: 2451 bytes --]
diff -Nru bitbake-1.10.0.orig/lib/bb/cooker.py bitbake-1.10.0/lib/bb/cooker.py
--- bitbake-1.10.0.orig/lib/bb/cooker.py 2010-08-13 17:57:38.000000000 +0200
+++ bitbake-1.10.0/lib/bb/cooker.py 2010-10-20 13:14:28.000000000 +0200
@@ -91,6 +91,7 @@
if not self.configuration.cmd:
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
+ self.configuration.cmd = self.configuration.cmd.split(",")
bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
@@ -320,7 +321,8 @@
runlist = []
for k in pkgs_to_build:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % task])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
@@ -695,8 +697,9 @@
# Remove stamp for target if force mode active
if self.configuration.force:
- bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (task, fn))
- bb.build.del_stamp('do_%s' % task, self.status, fn)
+ for t in task:
+ bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (t, fn))
+ bb.build.del_stamp('do_%s' % t, self.status, fn)
# Setup taskdata structure
taskdata = bb.taskdata.TaskData(self.configuration.abort)
@@ -706,7 +709,9 @@
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.configuration.event_data)
# Execute the runqueue
- runlist = [[item, "do_%s" % task]]
+ runlist = []
+ for t in task:
+ runlist.append([item, "do_%s" % t])
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
@@ -780,7 +785,8 @@
runlist = []
for k in targets:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % task])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
[-- Attachment #5: bitbake-1.10.1-comma-separated-tasks.patch --]
[-- Type: text/x-patch, Size: 2451 bytes --]
diff -Nru bitbake-1.10.1.orig/lib/bb/cooker.py bitbake-1.10.1/lib/bb/cooker.py
--- bitbake-1.10.1.orig/lib/bb/cooker.py 2010-10-15 02:45:07.000000000 +0200
+++ bitbake-1.10.1/lib/bb/cooker.py 2010-10-20 13:07:34.000000000 +0200
@@ -91,6 +91,7 @@
if not self.configuration.cmd:
self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build"
+ self.configuration.cmd = self.configuration.cmd.split(",")
bbpkgs = bb.data.getVar('BBPKGS', self.configuration.data, True)
if bbpkgs and len(self.configuration.pkgs_to_build) == 0:
@@ -320,7 +321,8 @@
runlist = []
for k in pkgs_to_build:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % task])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
@@ -695,8 +697,9 @@
# Remove stamp for target if force mode active
if self.configuration.force:
- bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (task, fn))
- bb.build.del_stamp('do_%s' % task, self.status, fn)
+ for t in task:
+ bb.msg.note(2, bb.msg.domain.RunQueue, "Remove stamp %s, %s" % (t, fn))
+ bb.build.del_stamp('do_%s' % t, self.status, fn)
# Setup taskdata structure
taskdata = bb.taskdata.TaskData(self.configuration.abort)
@@ -706,7 +709,9 @@
bb.event.fire(bb.event.BuildStarted(buildname, [item]), self.configuration.event_data)
# Execute the runqueue
- runlist = [[item, "do_%s" % task]]
+ runlist = []
+ for t in task:
+ runlist.append([item, "do_%s" % t])
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
@@ -780,7 +785,8 @@
runlist = []
for k in targets:
taskdata.add_provider(localdata, self.status, k)
- runlist.append([k, "do_%s" % task])
+ for t in task:
+ runlist.append([k, "do_%s" % t])
taskdata.add_unresolved(localdata, self.status)
rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist)
reply other threads:[~2010-10-20 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20101020160943.161310@gmx.net \
--to=alexander.stohr@gmx.de \
--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 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.