summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-06-20 19:47:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-28 16:02:15 +0100
commit3dea09570a0978e74c50d57efedb96ff97889e69 (patch)
tree8813711e0148d4a825c5ab70e52063e871cec9b0 /bitbake
parentb4b2e6d4dfa4bac7aec100bae4bca36e371e4ed9 (diff)
downloadpoky-3dea09570a0978e74c50d57efedb96ff97889e69.tar.gz
bitbake: cache: don't insert PN into PACKAGES
The cache code currently inserts PN into the package list if it isn't already present. Whilst this ensures that the package list contains something which is important for native recipes that don't set PACKAGES, it causes confusing behaviour where a normal recipe doesn't have PN in PACKAGES: for example adding dhcp to IMAGE_INSTALL will parse successfully but fail at rootfs time as the dhcp recipe doesn't generate a dhcp package. Solve this by only adding PN to the cache's package list if the package list is empty. This results in the package list for recipes such as DHCP being correct, but native recipes continue to have just PN in the list as before. [ YOCTO #5533 ] (Bitbake rev: df31a88786ce5bd7708ff14e1379dc2a58a8c0cf) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index e7eeb4f505..514399269a 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -107,7 +107,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
107 107
108 self.pn = self.getvar('PN', metadata) 108 self.pn = self.getvar('PN', metadata)
109 self.packages = self.listvar('PACKAGES', metadata) 109 self.packages = self.listvar('PACKAGES', metadata)
110 if not self.pn in self.packages: 110 if not self.packages:
111 self.packages.append(self.pn) 111 self.packages.append(self.pn)
112 112
113 self.basetaskhashes = self.taskvar('BB_BASEHASH', self.tasks, metadata) 113 self.basetaskhashes = self.taskvar('BB_BASEHASH', self.tasks, metadata)
@@ -217,7 +217,7 @@ class CoreRecipeInfo(RecipeInfoCommon):
217 cachedata.packages_dynamic[package].append(fn) 217 cachedata.packages_dynamic[package].append(fn)
218 218
219 # Build hash of runtime depends and recommends 219 # Build hash of runtime depends and recommends
220 for package in self.packages + [self.pn]: 220 for package in self.packages:
221 cachedata.rundeps[fn][package] = list(self.rdepends) + self.rdepends_pkg[package] 221 cachedata.rundeps[fn][package] = list(self.rdepends) + self.rdepends_pkg[package]
222 cachedata.runrecs[fn][package] = list(self.rrecommends) + self.rrecommends_pkg[package] 222 cachedata.runrecs[fn][package] = list(self.rrecommends) + self.rrecommends_pkg[package]
223 223