public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build
Date: Sat, 28 Sep 2019 10:15:49 +0200	[thread overview]
Message-ID: <58eb987c-914f-d47b-6187-595dba4ff94f@web.de> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

First, there is no reason to match that closely on the repos used for
downloading Debian. That only breaks when using a different distro or
source.

Second, we must enforce the usage of base-apt in case of cached build.
Using a weak assignment will fail if the user specified
DISTRO_APT_PREMIRRORS for online build.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

This should go in before the deb.debian.org change.

 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 3cf784d..1a58471 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -30,8 +30,6 @@ DISTRO_BOOTSTRAP_BASE_PACKAGES_append_gnupg = ",gnupg"
 DISTRO_BOOTSTRAP_BASE_PACKAGES_append_https-support = ",apt-transport-https,ca-certificates"
 HOST_DISTRO_APT_SOURCES += "conf/distro/${HOST_DISTRO}.list"

-DISTRO_APT_PREMIRRORS ?= "${@ "http://ftp\.(\S+\.)?debian.org/\S* file:///${REPO_BASE_DIR}/${BASE_DISTRO} \n" if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')) else "" }"
-
 python () {
     distro_bootstrap_keys = (d.getVar("DISTRO_BOOTSTRAP_KEYS") or "").split()

@@ -98,7 +96,10 @@ def parse_aptsources_list_line(source_list_line):
 def get_apt_source_mirror(d, aptsources_entry_list):
     import re

-    premirrors = d.getVar('DISTRO_APT_PREMIRRORS', True) or ""
+    if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')):
+        premirrors = "\S* file://${REPO_BASE_DIR}/${BASE_DISTRO}\n"
+    else:
+        premirrors = d.getVar('DISTRO_APT_PREMIRRORS', True) or ""
     mirror_list = [entry.split()
                   for entry in premirrors.split('\\n')
                   if any(entry)]
--
2.16.4


             reply	other threads:[~2019-09-28  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-28  8:15 Jan Kiszka [this message]
2019-09-29 14:34 ` Baurzhan Ismagulov
2019-10-02  7:12 ` Baurzhan Ismagulov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58eb987c-914f-d47b-6187-595dba4ff94f@web.de \
    --to=jan.kiszka@web.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox