mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 07:51:59 -09:00
support/scripts/pkg-stats: fix host/target infra filter
The filter is supposed to exclude host/target infra from output if the respective package is not built with the current configuration. However, excluding host packages did not work correctly: If keep_host is False because the host package is not built, the next branch was checked and included the host infra in output with "target" type if the target package is built. For a package that support host and target build, but gets built only for the target, this leads to output like (Meson example): meson (target) host-meson (target) Skip host infra in the target branch instead. Also include Package.infra in Package.__str__() result, which was needed for debugging this bug. Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
2ab95cf0ee
commit
e8dcebf459
@@ -205,7 +205,7 @@ class Package:
|
||||
infra = match.group(1)
|
||||
if infra.startswith("host-") and keep_host:
|
||||
self.infras.append(("host", infra[5:]))
|
||||
elif keep_target:
|
||||
elif not infra.startswith("host-") and keep_target:
|
||||
self.infras.append(("target", infra))
|
||||
|
||||
def set_license(self):
|
||||
@@ -342,9 +342,10 @@ class Package:
|
||||
return self.path < other.path
|
||||
|
||||
def __str__(self):
|
||||
return "%s (path='%s', license='%s', license_files='%s', hash='%s', patches=%d)" % \
|
||||
return "%s (path='%s', license='%s', license_files='%s', hash='%s', patches=%d, infras=%r)" % \
|
||||
(self.name, self.path, self.is_status_ok('license'),
|
||||
self.is_status_ok('license-files'), self.status['hash'], self.patch_count)
|
||||
self.is_status_ok('license-files'), self.status['hash'], self.patch_count,
|
||||
self.infras)
|
||||
|
||||
|
||||
def get_pkglist(trees, npackages, package_list):
|
||||
|
||||
Reference in New Issue
Block a user