public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-bootstrap: Fail on invalid apt source list
@ 2021-11-16  9:59 Anton Mikanovich
  2021-11-17 17:12 ` Henning Schild
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Mikanovich @ 2021-11-16  9:59 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 issue #72

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

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index e9f92916..20a9afaf 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -163,11 +163,10 @@ 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:]
-    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

end of thread, other threads:[~2021-11-18  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  9:59 [PATCH] isar-bootstrap: Fail on invalid apt source list Anton Mikanovich
2021-11-17 17:12 ` Henning Schild
2021-11-18  6:50   ` Anton Mikanovich

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