[v7,09/10] kas: Add PREFETCH_BASE_APT config entry

Message ID 20240725151006.2129-10-ubely@ilbers.de
State New
Headers show
Series Improving base-apt usage | expand

Commit Message

Uladzimir Bely July 25, 2024, 3:07 p.m. UTC
This option allows to set ISAR_PREFETCH_BASE_APT to "0" or "1" and
choose between old and new base-apt behaviour.

Docker image kas uses should have "python3-apt" preinstalled
in order to have new functionality working.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 kas/opt/Kconfig                | 13 +++++++++++++
 kas/opt/prefetch-base-apt.yaml |  9 +++++++++
 2 files changed, 22 insertions(+)
 create mode 100644 kas/opt/prefetch-base-apt.yaml

Patch

diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
index 701bd263..e1476b8a 100644
--- a/kas/opt/Kconfig
+++ b/kas/opt/Kconfig
@@ -157,3 +157,16 @@  config KAS_INCLUDE_CACHE_DEB_SRC
 	string
 	default "kas/opt/cache-deb-src.yaml"
 	depends on CACHE_DEB_SRC
+
+
+config PREFETCH_BASE_APT
+	bool "Prefetch base-apt repo"
+	default y
+	help
+	  This makse Isar always take packages from base-apt repository where they
+	  are prefetched by debrepo script before requested.
+
+config KAS_INCLUDE_PREFETCH_BASE_APT
+	string
+	default "kas/opt/prefetch-base-apt.yaml"
+	depends on PREFETCH_BASE_APT
diff --git a/kas/opt/prefetch-base-apt.yaml b/kas/opt/prefetch-base-apt.yaml
new file mode 100644
index 00000000..0cbdb93f
--- /dev/null
+++ b/kas/opt/prefetch-base-apt.yaml
@@ -0,0 +1,9 @@ 
+# This software is a part of Isar.
+# Copyright (C) 2024 ilbers GmbH
+
+header:
+  version: 14
+
+local_conf_header:
+  prefetch-base-apt: |
+    ISAR_PREFETCH_BASE_APT = "1"