isar-bootstrap: Fix SRC_URI inclusion

Message ID 20211012081922.31157-1-Vijaikumar_Kanagarajan@mentor.com
State Superseded, archived
Headers show
Series isar-bootstrap: Fix SRC_URI inclusion | expand

Commit Message

Vijai Kumar K Oct. 11, 2021, 11:19 p.m. UTC
Fix commit 447b298.

Include the right entries to SRC_URI.

Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kiszka Oct. 12, 2021, midnight UTC | #1
On 12.10.21 10:19, Vijai Kumar K wrote:
> Fix commit 447b298.
> 
> Include the right entries to SRC_URI.
> 
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
>  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 b8af676..9f297ce 100644
> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> @@ -64,7 +64,7 @@ python () {
>          d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
>  
>      distro_apt_preferences = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_PREFERENCES", True)
> -    for file in distro_apt_sources.split():
> +    for file in distro_apt_preferences.split():
>          d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
>  }
>  
> 

Ah, good catch!

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

Jan
Anton Mikanovich Oct. 13, 2021, 9:40 p.m. UTC | #2
On 12.10.21 11:19, Vijai Kumar K wrote:
> Fix commit 447b298.
>
> Include the right entries to SRC_URI.
>
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
>   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 b8af676..9f297ce 100644
> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
> @@ -64,7 +64,7 @@ python () {
>           d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
>   
>       distro_apt_preferences = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_PREFERENCES", True)
> -    for file in distro_apt_sources.split():
> +    for file in distro_apt_preferences.split():
>           d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
>   }
>   

There is no any check in case DISTRO_APT_PREFERENCES is not set, so this 
will fail for CI targets.
Propose adding `or ""` for both distro_apt_sources and 
distro_apt_preferences here.
vijai kumar Oct. 18, 2021, 3:44 a.m. UTC | #3
On Thursday, October 14, 2021 at 12:10:24 PM UTC+5:30 ami...@ilbers.de 
wrote:

> On 12.10.21 11:19, Vijai Kumar K wrote: 
> > Fix commit 447b298. 
> > 
> > Include the right entries to SRC_URI. 
> > 
> > Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com> 
> > --- 
> > 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 b8af676..9f297ce 100644 
> > --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc 
> > +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc 
> > @@ -64,7 +64,7 @@ python () { 
> > d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d)) 
> > 
> > distro_apt_preferences = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + 
> "DISTRO_APT_PREFERENCES", True) 
> > - for file in distro_apt_sources.split(): 
> > + for file in distro_apt_preferences.split(): 
> > d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d)) 
> > } 
> > 
>
> There is no any check in case DISTRO_APT_PREFERENCES is not set, so this 
> will fail for CI targets. 
> Propose adding `or ""` for both distro_apt_sources and 
> distro_apt_preferences here.


Yes. V2 coming up.
 

>
>
> -- 
> 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 
>
>

Patch

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index b8af676..9f297ce 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -64,7 +64,7 @@  python () {
         d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
 
     distro_apt_preferences = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_PREFERENCES", True)
-    for file in distro_apt_sources.split():
+    for file in distro_apt_preferences.split():
         d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
 }