Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] runqueue: Improve timestamp comparisons
@ 2016-05-11 21:55 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-05-11 21:55 UTC (permalink / raw)
  To: bitbake-devel

python3 cares more about invalid type comparisons. Add break statements
and better tests to make the code paths clearer and avoid type issues
in python3. No code functionality change.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 8b3fe5a..aaaafc5 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1085,15 +1085,19 @@ class RunQueue:
                 stampfile3 = bb.build.stampfile(taskname2 + "_setscene", self.rqdata.dataCache, fn2)
                 t2 = get_timestamp(stampfile2)
                 t3 = get_timestamp(stampfile3)
+                if t3 and not t2:
+                    continue
                 if t3 and t3 > t2:
-                   continue
+                    continue
                 if fn == fn2 or (fulldeptree and fn2 not in stampwhitelist):
                     if not t2:
                         logger.debug(2, 'Stampfile %s does not exist', stampfile2)
                         iscurrent = False
+                        break
                     if t1 < t2:
                         logger.debug(2, 'Stampfile %s < %s', stampfile, stampfile2)
                         iscurrent = False
+                        break
                     if recurse and iscurrent:
                         if dep in cache:
                             iscurrent = cache[dep]




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-11 22:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 21:55 [PATCH] runqueue: Improve timestamp comparisons Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox