Patchwork [Bitbake-dev,oe] How does oe handle rebuilds?

login
register
mail settings
Submitter C Michael Sundius
Date March 7, 2011, 6:24 p.m.
Message ID <AANLkTimq_RPygsu8yOv_JZ1_Bjs20OZeQWb_v7YTTDNy@mail.gmail.com>
Download mbox | patch
Permalink /patch/1195/
State New
Headers show

Comments

C Michael Sundius - March 7, 2011, 6:24 p.m.
I think there are different policies that you can use to decide re building
dependent
packages...

I added a patch to our bitbake that creates a "black-list" of packages that
should be checked for decencies that have out of date time stamps.

this is different to what exists in bitbake since it currently uses a "white
list"
which becomes a list of packages that don't need to be checked. I found
that you'd have to select a lot of packages for that to be useful. most of
the
time people are developing on a finite number of packages which you might
need to rebuild.

attached is a diff to the bitbake that we're currently using (its version is
1.11 or something)
I hope its useful (I'd love for it to be put into bitbake, alas it slipped
through the cracks
last time I pointed it out to the list).

I'm adding bitbake-dev on this list since *I think* this is a bitbake thing.

mike





On Mon, Mar 7, 2011 at 9:58 AM, Charles Manning <cdhmanning@gmail.com>wrote:

> I find I often have problems when using oe that changing a recipe does
> not result in dependent packages being rebuilt. A bit of Googling
> suggests that many experience this issue and take manual steps to
> force rebuilding.
>
> For example, changing the kernel requires rebuilding various libraries
> (tslib etc) and rebuilding the image.
>
> 1.Should oe be able to handle that automatically or is this oe's
> "killer defect" (ie. opposite of "killer feature").
> 2. Is there something missing in recipes to show the correct dependencies?
> 3. What is the best way to manage these stale dependencies?
>
> Thanks
>
> Charles
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

Patch

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 7348846..b131572 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -174,6 +174,7 @@  class RunQueue:
         self.scheduler = bb.data.getVar("BB_SCHEDULER", cfgData, 1) or "speed"
         self.stamppolicy = bb.data.getVar("BB_STAMP_POLICY", cfgData, 1) or "perfile"
         self.stampwhitelist = bb.data.getVar("BB_STAMP_WHITELIST", cfgData, 1) or ""
+        self.stampblacklist = bb.data.getVar("BB_STAMP_BLACKLIST", cfgData, 1) or ""
 
     def reset_runqueue(self):
         self.runq_fnid = []
@@ -688,6 +689,17 @@  class RunQueue:
             stampfnwhitelist.append(fn)
         self.stampfnwhitelist = stampfnwhitelist
 
+        # Create a blacklist usable by the stamp checks
+        stampfnblacklist = []
+        for entry in self.stampblacklist.split():
+            entryid = self.taskData.getbuild_id(entry)
+            if entryid not in self.taskData.build_targets:
+                continue
+            fnid = self.taskData.build_targets[entryid][0]
+            fn = self.taskData.fn_index[fnid]
+            stampfnblacklist.append(fn)
+        self.stampfnblacklist = stampfnblacklist
+
         #self.dump_data(taskData)
 
         self.state = runQueueRunInit
@@ -796,6 +808,9 @@  class RunQueue:
             if self.stamppolicy == "whitelist":
                 stampwhitelist = self.stampfnwhitelist
 
+        stampblacklist = []
+        stampblacklist = self.stampfnblacklist
+
         fn = self.taskData.fn_index[self.runq_fnid[task]]
         if taskname is None:
             taskname = self.runq_task[task]
@@ -817,7 +832,7 @@  class RunQueue:
                 fn2 = self.taskData.fn_index[self.runq_fnid[dep]]
                 taskname2 = self.runq_task[dep]
                 stampfile2 = "%s.%s" % (self.dataCache.stamp[fn2], taskname2)
-                if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
+                if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist) or fn2 in stampblacklist:
                     try:
                         t2 = os.stat(stampfile2)[stat.ST_MTIME]
                         if t1 < t2: