summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2014-06-08 16:15:13 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-06-08 17:09:38 +0200
commitf93edd823fb020721ba84dcecbac37c668260b8f (patch)
treebc35af7e166c04e9e9e866d0e6ead130cfd6eb7a /support
parente49d4f0c378960e3895381eea78ada48cca310fb (diff)
downloadbuildroot-f93edd823fb020721ba84dcecbac37c668260b8f.tar.gz
buildroot-f93edd823fb020721ba84dcecbac37c668260b8f.zip
support/scripts: do not display virtual packages in generated lists
If a package has both a 'real' and a 'virtual' definition, consider it is a virtual package and do not display it in the generated package list. This is the case for jpeg and cryptodev, that are virtual packages, but also real (but empty) packages used to provide a prompt to enable/disable a choice to select an implementation. In this case, we do not want to list the virtual packages, but only their implementations. So, consider packages that are both real and virtual as virtual packages. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Acked-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rw-r--r--support/scripts/gen-manual-lists.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/support/scripts/gen-manual-lists.py b/support/scripts/gen-manual-lists.py
index e234ef1106..a3b5aea8c0 100644
--- a/support/scripts/gen-manual-lists.py
+++ b/support/scripts/gen-manual-lists.py
@@ -279,13 +279,30 @@ class Buildroot:
pkg_list.append(re.sub(r"(.*?)\.mk", r"\1", file_))
setattr(self, "_package_list", pkg_list)
for pkg in getattr(self, "_package_list"):
- if pattern.match(pkg):
- return True
+ if type == 'real':
+ if pattern.match(pkg) and not self._exists_virt_symbol(pkg):
+ return True
return False
def _is_real_package(self, symbol):
return self._is_package(symbol, 'real')
+ def _exists_virt_symbol(self, pkg_name):
+ """ Return True if a symbol exists that defines the package as
+ a virtual package, False otherwise
+
+ :param pkg_name: The name of the package, for which to check if
+ a symbol exists defining it as a virtual package
+
+ """
+ virt_pattern = "BR2_PACKAGE_HAS_" + pkg_name + "$"
+ virt_pattern = re.sub("_", ".", virt_pattern)
+ virt_pattern = re.compile(virt_pattern, re.IGNORECASE)
+ for sym in self.config:
+ if virt_pattern.match(sym.get_name()):
+ return True
+ return False
+
def _get_pkg_name(self, symbol):
""" Return the package name of the specified symbol.
OpenPOWER on IntegriCloud