Skip to content

DRAFT: Buildroot for eln-extras #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions content_resolver/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,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)
Expand Down Expand Up @@ -2351,7 +2352,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)
Expand Down Expand Up @@ -2584,7 +2586,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:
Expand Down Expand Up @@ -3421,4 +3424,4 @@ def analyze_things(self):

self._record_metric("finished analyze_things()")

return self.data
return self.data
6 changes: 6 additions & 0 deletions content_resolver/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,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"]:
Expand Down
3 changes: 2 additions & 1 deletion content_resolver/historia_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def _save_current_historic_data(query):
week=week
)
output_dir = os.path.join(query.settings["output"], "history")
os.makedirs(output_dir, exist_ok=True)
file_path = os.path.join(output_dir, filename)

# What to save there
Expand Down Expand Up @@ -574,4 +575,4 @@ def generate_historic_data(query):
_generate_chartjs_data(historic_data, query)

log("Done!")
log("")
log("")