Patchwork [4/5] buildhistory_analysis: report if all items removed from a list

login
register
mail settings
Submitter Paul Eggleton
Date March 20, 2012, 4:06 p.m.
Message ID <0da63bcf8dd1843eeddfeb2348791fa75691fe74.1332259383.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/23899/
State Accepted
Commit 2434a751e9684058786d4595cef3678d397f3c39
Headers show

Comments

Paul Eggleton - March 20, 2012, 4:06 p.m.
If all items have been removed from a list then state that explicitly.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/lib/oe/buildhistory_analysis.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 2942f72..4f55d9a 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -76,7 +76,10 @@  class ChangeRecord:
             added = list(set(bitems) - set(aitems))
 
             if removed or added:
-                out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')
+                if removed and not bitems:
+                    out = '%s: removed all items "%s"' % (self.fieldname, ' '.join(removed))
+                else:
+                    out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')
             else:
                 out = '%s changed order' % self.fieldname
         elif self.fieldname in numeric_fields: