summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-17 12:12:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-19 18:05:47 +0100
commit90d97f7a57125df00c0fd62772e782a638176d7a (patch)
treef9a61d76d7185f22c79b02e190592946f6ed6484 /bitbake
parent67a6a4d6c0f060dd3b383aa28195c1c6a8e581d6 (diff)
downloadpoky-90d97f7a57125df00c0fd62772e782a638176d7a.tar.gz
bitbake: bitbake-layers: refactor show-appends to stop using cooker bbappends list
(Bitbake rev: 60a253555a3ebadea775cfdc3331cba78ee3e71b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/bitbake-layers21
1 files changed, 13 insertions, 8 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 62b51b0583..8cf7196c53 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -719,18 +719,21 @@ build results (as the layer priority order has effectively changed).
719Lists recipes with the bbappends that apply to them as subitems. 719Lists recipes with the bbappends that apply to them as subitems.
720""" 720"""
721 self.init_bbhandler() 721 self.init_bbhandler()
722 if not self.bbhandler.cooker.collection.bbappends:
723 logger.plain('No append files found')
724 return 0
725 722
726 logger.plain('=== Appended recipes ===') 723 logger.plain('=== Appended recipes ===')
727 724
728 pnlist = list(self.bbhandler.cooker_data.pkg_pn.keys()) 725 pnlist = list(self.bbhandler.cooker_data.pkg_pn.keys())
729 pnlist.sort() 726 pnlist.sort()
727 appends = False
730 for pn in pnlist: 728 for pn in pnlist:
731 self.show_appends_for_pn(pn) 729 if self.show_appends_for_pn(pn):
730 appends = True
731
732 if self.show_appends_for_skipped():
733 appends = True
732 734
733 self.show_appends_for_skipped() 735 if not appends:
736 logger.plain('No append files found')
734 737
735 def show_appends_for_pn(self, pn): 738 def show_appends_for_pn(self, pn):
736 filenames = self.bbhandler.cooker_data.pkg_pn[pn] 739 filenames = self.bbhandler.cooker_data.pkg_pn[pn]
@@ -741,12 +744,12 @@ Lists recipes with the bbappends that apply to them as subitems.
741 self.bbhandler.cooker_data.pkg_pn) 744 self.bbhandler.cooker_data.pkg_pn)
742 best_filename = os.path.basename(best[3]) 745 best_filename = os.path.basename(best[3])
743 746
744 self.show_appends_output(filenames, best_filename) 747 return self.show_appends_output(filenames, best_filename)
745 748
746 def show_appends_for_skipped(self): 749 def show_appends_for_skipped(self):
747 filenames = [os.path.basename(f) 750 filenames = [os.path.basename(f)
748 for f in self.bbhandler.cooker.skiplist.iterkeys()] 751 for f in self.bbhandler.cooker.skiplist.iterkeys()]
749 self.show_appends_output(filenames, None, " (skipped)") 752 return self.show_appends_output(filenames, None, " (skipped)")
750 753
751 def show_appends_output(self, filenames, best_filename, name_suffix = ''): 754 def show_appends_output(self, filenames, best_filename, name_suffix = ''):
752 appended, missing = self.get_appends_for_files(filenames) 755 appended, missing = self.get_appends_for_files(filenames)
@@ -760,7 +763,9 @@ Lists recipes with the bbappends that apply to them as subitems.
760 if best_filename in missing: 763 if best_filename in missing:
761 logger.warn('%s: missing append for preferred version', 764 logger.warn('%s: missing append for preferred version',
762 best_filename) 765 best_filename)
763 766 return True
767 else:
768 return False
764 769
765 def get_appends_for_files(self, filenames): 770 def get_appends_for_files(self, filenames):
766 appended, notappended = [], [] 771 appended, notappended = [], []