Skip to contentSkip to conversation

runqueue: Fix setscene tasks not running

PATCH In review Richard Purdie 2 participants 2 messages Aug 27, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runqueue: Fix setscene tasks not running

Currently, if you have hard dependencies between setscene tasks (like avahi on base-passwd through useradd.bbclass), other dependencies may not be installed even if these exist in sstate. For example, avahi -> expat -> pigz-native (and avahi -> base-passwd) yet if you cleansstate base-passwd:

bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate bitbake avahi | tee

you will currently see pigz-native being rebuilt even though it was in sstate. The fix for this is to continue to iterate dependency chains around hard blocked dependencies as per this patch.

After this patch is applied, you will see pigz-native installed from sstate.

bitbake/lib/bb/runqueue.py +4 -0
index e13dc57..e32f81a 100644
@@ -1844,6 +1844,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
                 realtask = self.rqdata.runq_setscene[task]
                 realdep = self.rqdata.runq_setscene[dep]
                 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (self.rqdata.get_user_idstring(realtask), self.rqdata.get_user_idstring(realdep)))
+                self.scenequeue_updatecounters(dep, fail)
+                continue
+            if task not in self.sq_revdeps2[dep]:
+                # May already have been removed by the fail case above
                 continue
             self.sq_revdeps2[dep].remove(task)
             if len(self.sq_revdeps2[dep]) == 0:
#1 lore raw

Thank you very much, I tested it again, it worked well.

// Robert

Quoted 33 lines · Richard Purdie

Currently, if you have hard dependencies between setscene tasks (like avahi on base-passwd through useradd.bbclass), other dependencies may not be installed even if these exist in sstate. For example, avahi -> expat -> pigz-native (and avahi -> base-passwd) yet if you cleansstate base-passwd:

bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate bitbake avahi | tee

you will currently see pigz-native being rebuilt even though it was in sstate. The fix for this is to continue to iterate dependency chains around hard blocked dependencies as per this patch.

After this patch is applied, you will see pigz-native installed from sstate.

bitbake/lib/bb/runqueue.py +4 -0
index e13dc57..e32f81a 100644
@@ -1844,6 +1844,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
                  realtask = self.rqdata.runq_setscene[task]
                  realdep = self.rqdata.runq_setscene[dep]
                  logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (self.rqdata.get_user_idstring(realtask), self.rqdata.get_user_idstring(realdep)))
+                self.scenequeue_updatecounters(dep, fail)
+                continue
+            if task not in self.sq_revdeps2[dep]:
+                # May already have been removed by the fail case above
                  continue
              self.sq_revdeps2[dep].remove(task)
              if len(self.sq_revdeps2[dep]) == 0: