[3/4] mmdebstrap: Allow for DISTRO_SOURCE to be empty

Message ID 20250812130249.709960-4-anaumann@emlix.com
State Under Review
Headers show
Series Bootstrap from local isar-apt repo | expand

Commit Message

Andreas Naumann Aug. 12, 2025, 1:02 p.m. UTC
For isar-apt to be actually used, mmdebstrap needs to be supplied
with the correct suite name, "isar" as default.

Introduce a flag which allows switching to use the suite of the
internal isar-apt instead of DISTRO_SOURCE

Signed-off-by: Andreas Naumann <anaumann@emlix.com>
---
 meta/classes/bootstrap.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/meta/classes/bootstrap.bbclass b/meta/classes/bootstrap.bbclass
index 64702d5d54..ae1dec9318 100644
--- a/meta/classes/bootstrap.bbclass
+++ b/meta/classes/bootstrap.bbclass
@@ -179,6 +179,8 @@  def generate_distro_sources(d):
                     yield parsed
 
 def get_distro_primary_source_entry(d):
+    if bb.utils.to_boolean(d.getVar('ISAR_USE_ISAR_APT_TO_BOOTSTRAP')):
+        return ["", "${DEBDISTRONAME}", "main"]
     for source in generate_distro_sources(d):
         if source[0] == "deb":
             return source[2:]