public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build
@ 2019-09-28  8:15 Jan Kiszka
  2019-09-29 14:34 ` Baurzhan Ismagulov
  2019-10-02  7:12 ` Baurzhan Ismagulov
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2019-09-28  8:15 UTC (permalink / raw)
  To: isar-users

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build
  2019-09-28  8:15 [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build Jan Kiszka
@ 2019-09-29 14:34 ` Baurzhan Ismagulov
  2019-10-02  7:12 ` Baurzhan Ismagulov
  1 sibling, 0 replies; 3+ messages in thread
From: Baurzhan Ismagulov @ 2019-09-29 14:34 UTC (permalink / raw)
  To: isar-users

On Sat, Sep 28, 2019 at 10:15:49AM +0200, Jan Kiszka wrote:
> 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>

Tested-by: Baurzhan Ismagulov <ibr@ilbers.de>

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build
  2019-09-28  8:15 [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build Jan Kiszka
  2019-09-29 14:34 ` Baurzhan Ismagulov
@ 2019-10-02  7:12 ` Baurzhan Ismagulov
  1 sibling, 0 replies; 3+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-02  7:12 UTC (permalink / raw)
  To: isar-users

On Sat, Sep 28, 2019 at 10:15:49AM +0200, Jan Kiszka wrote:
> 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.

Applied to next, thanks.

With kind regards,
Baurzhan.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-02  7:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-28  8:15 [PATCH] isar-bootstrap: Fix PREMIRRORS setting for cached build Jan Kiszka
2019-09-29 14:34 ` Baurzhan Ismagulov
2019-10-02  7:12 ` Baurzhan Ismagulov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox