All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
@ 2020-10-13 18:36 Khem Raj
  2020-10-13 18:36 ` [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S Khem Raj
  2020-10-13 20:55 ` [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Denys Dmytriyenko
  0 siblings, 2 replies; 6+ messages in thread
From: Khem Raj @ 2020-10-13 18:36 UTC (permalink / raw)
  To: meta-ti; +Cc: Khem Raj

latest OE-core does not promote using trailing slash to make pseudo's
life easier

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 classes/ti-pdk-fetch.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/classes/ti-pdk-fetch.bbclass b/classes/ti-pdk-fetch.bbclass
index 0c9879be..4261e86d 100644
--- a/classes/ti-pdk-fetch.bbclass
+++ b/classes/ti-pdk-fetch.bbclass
@@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}"
 PE = "2"
 
 TI_PDK_COMP ?= ""
-TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}"
+TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"
 
 TI_PDK_SOURCE_PN = "ti-pdk-source"
 TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}"
 TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git"
 
-S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}"
+S = "${WORKDIR}/git${TI_PDK_COMP_PATH}"
 
 # Hard-link only required sources from PDK
 python do_unpack_append() {
-- 
2.28.0


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

* [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S
  2020-10-13 18:36 [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Khem Raj
@ 2020-10-13 18:36 ` Khem Raj
  2020-10-13 20:25   ` [meta-ti] " Denys Dmytriyenko
  2020-10-13 20:55 ` [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Denys Dmytriyenko
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-10-13 18:36 UTC (permalink / raw)
  To: meta-ti; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb b/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
index 2dfae1ec..2bbdd018 100644
--- a/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
+++ b/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
@@ -51,7 +51,7 @@ CORESDK_RTOS_FILE_PREFIX ?= ""
 CORESDK_RTOS_FILE_SUFFIX ?= ""
 
 # Common code below
-S = "${WORKDIR}/lib/"
+S = "${WORKDIR}/lib"
 
 PV = "${CORESDK_RTOS_VERSION_DOT}"
 
-- 
2.28.0


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

* Re: [meta-ti] [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S
  2020-10-13 18:36 ` [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S Khem Raj
@ 2020-10-13 20:25   ` Denys Dmytriyenko
  0 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2020-10-13 20:25 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-ti

On Tue, Oct 13, 2020 at 11:36:42AM -0700, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

Reviewed-by: Denys Dmytriyenko <denys@ti.com>


> ---
>  recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb b/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
> index 2dfae1ec..2bbdd018 100644
> --- a/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
> +++ b/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb
> @@ -51,7 +51,7 @@ CORESDK_RTOS_FILE_PREFIX ?= ""
>  CORESDK_RTOS_FILE_SUFFIX ?= ""
>  
>  # Common code below
> -S = "${WORKDIR}/lib/"
> +S = "${WORKDIR}/lib"
>  
>  PV = "${CORESDK_RTOS_VERSION_DOT}"
>  
> -- 
> 2.28.0
> 

> 
> 
> 


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

* Re: [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
  2020-10-13 18:36 [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Khem Raj
  2020-10-13 18:36 ` [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S Khem Raj
@ 2020-10-13 20:55 ` Denys Dmytriyenko
  2020-10-13 21:22   ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Denys Dmytriyenko @ 2020-10-13 20:55 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-ti

On Tue, Oct 13, 2020 at 11:36:41AM -0700, Khem Raj wrote:
> latest OE-core does not promote using trailing slash to make pseudo's
> life easier
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  classes/ti-pdk-fetch.bbclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/classes/ti-pdk-fetch.bbclass b/classes/ti-pdk-fetch.bbclass
> index 0c9879be..4261e86d 100644
> --- a/classes/ti-pdk-fetch.bbclass
> +++ b/classes/ti-pdk-fetch.bbclass
> @@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}"
>  PE = "2"
>  
>  TI_PDK_COMP ?= ""
> -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}"
> +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"

This one I don't understand - even when TI_PDK_COMP is empty, 
TI_PDK_COMP_PATH will have a trailing slash, hence S below will 
have it too...

Moreover, below in this class there's this line:

src = os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))

If TI_PDK_COMP_PATH starts with a leading slash, os.path.join treats 
it as absolute and the resulting "src" var will be completely wrong.

So, I believe this change is incorrect.


>  TI_PDK_SOURCE_PN = "ti-pdk-source"
>  TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}"
>  TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git"
>  
> -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}"
> +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}"
>  
>  # Hard-link only required sources from PDK
>  python do_unpack_append() {
> -- 
> 2.28.0
> 

> 
> 
> 


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

* Re: [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
  2020-10-13 20:55 ` [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Denys Dmytriyenko
@ 2020-10-13 21:22   ` Khem Raj
  2020-10-13 21:27     ` Denys Dmytriyenko
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2020-10-13 21:22 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-ti

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

On Tue, Oct 13, 2020 at 1:55 PM Denys Dmytriyenko <denys@ti.com> wrote:

> On Tue, Oct 13, 2020 at 11:36:41AM -0700, Khem Raj wrote:
> > latest OE-core does not promote using trailing slash to make pseudo's
> > life easier
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  classes/ti-pdk-fetch.bbclass | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/classes/ti-pdk-fetch.bbclass b/classes/ti-pdk-fetch.bbclass
> > index 0c9879be..4261e86d 100644
> > --- a/classes/ti-pdk-fetch.bbclass
> > +++ b/classes/ti-pdk-fetch.bbclass
> > @@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}"
> >  PE = "2"
> >
> >  TI_PDK_COMP ?= ""
> > -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}"
> > +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"
>
> This one I don't understand - even when TI_PDK_COMP is empty,
> TI_PDK_COMP_PATH will have a trailing slash, hence S below will
> have it too...


Right I think I was thinking of ensuring that we can make conditional to
have the slash always and then remove it from S which is missing

I guess it needs to be solved differently


>
> Moreover, below in this class there's this line:
>
> src =
> os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))
>
> If TI_PDK_COMP_PATH starts with a leading slash, os.path.join treats
> it as absolute and the resulting "src" var will be completely wrong.


This is not going to be problem it will just use // in worst case


>
> So, I believe this change is incorrect.
>
>
> >  TI_PDK_SOURCE_PN = "ti-pdk-source"
> >  TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}"
> >  TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git"
> >
> > -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}"
> > +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}"
> >
> >  # Hard-link only required sources from PDK
> >  python do_unpack_append() {
> > --
> > 2.28.0
> >
>
> >
> > 
> >
>
>

[-- Attachment #2: Type: text/html, Size: 3154 bytes --]

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

* Re: [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
  2020-10-13 21:22   ` Khem Raj
@ 2020-10-13 21:27     ` Denys Dmytriyenko
  0 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2020-10-13 21:27 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-ti

On Tue, Oct 13, 2020 at 02:22:30PM -0700, Khem Raj wrote:
> On Tue, Oct 13, 2020 at 1:55 PM Denys Dmytriyenko <denys@ti.com> wrote:
> 
> > On Tue, Oct 13, 2020 at 11:36:41AM -0700, Khem Raj wrote:
> > > latest OE-core does not promote using trailing slash to make pseudo's
> > > life easier
> > >
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > ---
> > >  classes/ti-pdk-fetch.bbclass | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/classes/ti-pdk-fetch.bbclass b/classes/ti-pdk-fetch.bbclass
> > > index 0c9879be..4261e86d 100644
> > > --- a/classes/ti-pdk-fetch.bbclass
> > > +++ b/classes/ti-pdk-fetch.bbclass
> > > @@ -9,13 +9,13 @@ PV = "${TI_PDK_VERSION}"
> > >  PE = "2"
> > >
> > >  TI_PDK_COMP ?= ""
> > > -TI_PDK_COMP_PATH = "${@'${TI_PDK_COMP}'.replace('.','/')}"
> > > +TI_PDK_COMP_PATH = "/${@'${TI_PDK_COMP}'.replace('.','/')}"
> >
> > This one I don't understand - even when TI_PDK_COMP is empty,
> > TI_PDK_COMP_PATH will have a trailing slash, hence S below will
> > have it too...
> 
> 
> Right I think I was thinking of ensuring that we can make conditional to
> have the slash always and then remove it from S which is missing
> 
> I guess it needs to be solved differently
> 
> 
> >
> > Moreover, below in this class there's this line:
> >
> > src =
> > os.path.join(d.getVar('TI_PDK_SOURCE'),'packages',d.getVar('TI_PDK_COMP_PATH'))
> >
> > If TI_PDK_COMP_PATH starts with a leading slash, os.path.join treats
> > it as absolute and the resulting "src" var will be completely wrong.
> 
> 
> This is not going to be problem it will just use // in worst case

Nope, I tested - it should combine $TI_PDK_SOURCE/packages/$TI_PDK_COMP_PATH

>>> print(os.path.join('a','b','c'))
a/b/c
>>> print(os.path.join('a','b','/c'))
/c

So, if TI_PDK_COMP_PATH starts with slash, it becomes absolute and the final 
src path will be wrong.


> > So, I believe this change is incorrect.
> >
> >
> > >  TI_PDK_SOURCE_PN = "ti-pdk-source"
> > >  TI_PDK_SOURCE_WORKDIR = "${TMPDIR}/work-shared/ti-pdk-${PV}"
> > >  TI_PDK_SOURCE = "${TI_PDK_SOURCE_WORKDIR}/git"
> > >
> > > -S = "${WORKDIR}/git/${TI_PDK_COMP_PATH}"
> > > +S = "${WORKDIR}/git${TI_PDK_COMP_PATH}"
> > >
> > >  # Hard-link only required sources from PDK
> > >  python do_unpack_append() {
> > > --
> > > 2.28.0
> > >
> >
> > >
> > > 
> > >
> >
> >

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

end of thread, other threads:[~2020-10-13 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 18:36 [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Khem Raj
2020-10-13 18:36 ` [PATCH 2/2] ti-rtos-firmware: Remove trailing slash from S Khem Raj
2020-10-13 20:25   ` [meta-ti] " Denys Dmytriyenko
2020-10-13 20:55 ` [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming Denys Dmytriyenko
2020-10-13 21:22   ` Khem Raj
2020-10-13 21:27     ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.