All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denys Dmytriyenko" <denys@ti.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: <meta-ti@lists.yoctoproject.org>
Subject: Re: [meta-ti] [PATCH 1/2] ti-pdk-fetch.bbclass: Do not emit trailing slash during S forming
Date: Tue, 13 Oct 2020 17:27:37 -0400	[thread overview]
Message-ID: <20201013212736.GE14852@beryl> (raw)
In-Reply-To: <CAMKF1srt+gXsc9-xrcXrzu3-Q7eHGNA1vZwDrC0+Gf1wVyvdeQ@mail.gmail.com>

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

      reply	other threads:[~2020-10-13 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201013212736.GE14852@beryl \
    --to=denys@ti.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.