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

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