From cb605b173ada142a70a2bd017d64ed8d87e229de Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 18 Feb 2025 14:28:18 -0800 Subject: [PATCH] Enable buildroot for eln-extras --- content_resolver/analyzer.py | 9 ++++++--- content_resolver/config_manager.py | 6 ++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/content_resolver/analyzer.py b/content_resolver/analyzer.py index eaaffd3..7671440 100644 --- a/content_resolver/analyzer.py +++ b/content_resolver/analyzer.py @@ -2261,7 +2261,8 @@ def _analyze_buildroot(self): for view_conf_id in self.configs["views"]: view_conf = self.configs["views"][view_conf_id] - if view_conf["type"] == "compose": + #if view_conf["type"] == "compose": + if True: if view_conf["buildroot_strategy"] == "root_logs": for arch in view_conf["architectures"]: self._populate_buildroot_with_view_srpms(view_conf, arch) @@ -2467,7 +2468,8 @@ def _add_buildroot_to_views(self): for view_conf_id in self.configs["views"]: view_conf = self.configs["views"][view_conf_id] - if view_conf["type"] == "compose": + #if view_conf["type"] == "compose": + if True: if view_conf["buildroot_strategy"] == "root_logs": for arch in view_conf["architectures"]: self._add_buildroot_to_view(view_conf, arch) @@ -2700,7 +2702,8 @@ def _generate_views_all_arches(self): view_all_arches["id"] = view_conf_id view_all_arches["has_buildroot"] = False - if view_conf["type"] == "compose": + #if view_conf["type"] == "compose": + if True: if view_conf["buildroot_strategy"] == "root_logs": view_all_arches["has_buildroot"] = True else: diff --git a/content_resolver/config_manager.py b/content_resolver/config_manager.py index e4aaa8f..2853bb6 100644 --- a/content_resolver/config_manager.py +++ b/content_resolver/config_manager.py @@ -514,6 +514,12 @@ def _load_config_addon_view(self, document_id, document, settings): for pkg in document["data"]["unwanted_packages"]: config["unwanted_packages"].append(str(pkg)) + # Buildroot strategy + config["buildroot_strategy"] = "none" + if "buildroot_strategy" in document["data"]: + if str(document["data"]["buildroot_strategy"]) in ["none", "root_logs"]: + config["buildroot_strategy"] = str(document["data"]["buildroot_strategy"]) + # Packages to be flagged as unwanted on specific architectures config["unwanted_arch_packages"] = {} for arch in settings["allowed_arches"]: