public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list
@ 2021-12-13 10:09 Anton Mikanovich
  2021-12-13 10:09 ` [PATCH v2 2/2] isar-bootstrap: Remove unused line Anton Mikanovich
  2021-12-21 13:03 ` [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich
  0 siblings, 2 replies; 3+ messages in thread
From: Anton Mikanovich @ 2021-12-13 10:09 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Returning empty list leads to ambiguous errors, so we should fail early
if distro sources.list is empty or incorrect.

Fix #72

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 7e2c5884..4037141c 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -167,7 +167,7 @@ def get_distro_primary_source_entry(d):
     for source in generate_distro_sources(d):
         if source[0] == "deb":
             return source[2:]
-    return ["", "", ""]
+    bb.fatal('Invalid apt sources list')
 
 def get_distro_have_https_source(d):
     return any(source[2].startswith("https://") for source in generate_distro_sources(d))
-- 
2.20.1


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

* [PATCH v2 2/2] isar-bootstrap: Remove unused line
  2021-12-13 10:09 [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich
@ 2021-12-13 10:09 ` Anton Mikanovich
  2021-12-21 13:03 ` [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2021-12-13 10:09 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

The call of get_aptsources_list() was done with no any usage here.
It probably left from copy-paste from generate_distro_sources(), so we
can remove it.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 4037141c..26205192 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -163,7 +163,6 @@ def generate_distro_sources(d):
                     yield parsed
 
 def get_distro_primary_source_entry(d):
-    apt_sources_list = get_aptsources_list(d)
     for source in generate_distro_sources(d):
         if source[0] == "deb":
             return source[2:]
-- 
2.20.1


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

* Re: [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list
  2021-12-13 10:09 [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich
  2021-12-13 10:09 ` [PATCH v2 2/2] isar-bootstrap: Remove unused line Anton Mikanovich
@ 2021-12-21 13:03 ` Anton Mikanovich
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Mikanovich @ 2021-12-21 13:03 UTC (permalink / raw)
  To: isar-users

13.12.2021 13:09, Anton Mikanovich wrote:
> Returning empty list leads to ambiguous errors, so we should fail early
> if distro sources.list is empty or incorrect.
>
> Fix #72
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>

Applied to next.

-- 
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov


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

end of thread, other threads:[~2021-12-21 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 10:09 [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich
2021-12-13 10:09 ` [PATCH v2 2/2] isar-bootstrap: Remove unused line Anton Mikanovich
2021-12-21 13:03 ` [PATCH v2 1/2] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich

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