Patchwork classes/buildhistory: fix interaction with rm_work

login
register
mail settings
Submitter Paul Eggleton
Date April 9, 2013, 8:39 a.m.
Message ID <1365496764-6301-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/47679/
State Accepted
Commit fb37dd6822578fced05fa4ab66b56341a46b3bbc
Headers show

Comments

Paul Eggleton - April 9, 2013, 8:39 a.m.
Change do_write_srcrevs to a postfunc of do_fetch, avoiding a dependency
being created that causes large numbers of setscene tasks being executed
on every build with both buildhistory and rm_work being enabled.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 8c9f794..1ac1a8b 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -553,7 +553,8 @@  def _get_srcrev_values(d):
                 dict_tag_srcrevs[key] = rev
     return (dict_srcrevs, dict_tag_srcrevs)
 
-python do_write_srcrev() {
+do_fetch[postfuncs] += "write_srcrev"
+python write_srcrev() {
     pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
     srcrevfile = os.path.join(pkghistdir, 'latest_srcrev')
 
@@ -593,5 +594,3 @@  python do_write_srcrev() {
         if os.path.exists(srcrevfile):
             os.remove(srcrevfile)
 }
-
-addtask write_srcrev after do_fetch before do_build