All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] pypi.bbclass: mind package suffix on version check
@ 2020-05-09 20:32 Konrad Weihmann
  2020-05-09 21:12 ` [OE-core] " Tim Orling
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Konrad Weihmann @ 2020-05-09 20:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Konrad Weihmann

Some pypi packages do have suffixes like dev, or a0 or b1.
When doing a version check on these, the version will get falsely
identified as major release versions.
Add a terminating slash to rule out those false positives

Changes v2:

- ignore suffix versions instead of reporting them

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
---
 meta/classes/pypi.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
index e5d7ab3ce1..ffa8aa3ff4 100644
--- a/meta/classes/pypi.bbclass
+++ b/meta/classes/pypi.bbclass
@@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
 S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
 
 UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
-UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
+UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
-- 
2.20.1


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

* Re: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on version check
  2020-05-09 20:32 [PATCH v2] pypi.bbclass: mind package suffix on version check Konrad Weihmann
@ 2020-05-09 21:12 ` Tim Orling
       [not found] ` <160D7887899C970D.32017@lists.openembedded.org>
  2020-05-10 10:40 ` Peter Kjellerstedt
  2 siblings, 0 replies; 7+ messages in thread
From: Tim Orling @ 2020-05-09 21:12 UTC (permalink / raw)
  To: Konrad Weihmann; +Cc: openembedded-core

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

This version looks good.

On Sat, May 9, 2020 at 1:33 PM Konrad Weihmann <kweihmann@outlook.com>
wrote:

> Some pypi packages do have suffixes like dev, or a0 or b1.
> When doing a version check on these, the version will get falsely
> identified as major release versions.
> Add a terminating slash to rule out those false positives
>
> Changes v2:
>
> - ignore suffix versions instead of reporting them
>
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
>

Reviewed-by: Tim Orling <ticotimo@gmail.com>

---
>  meta/classes/pypi.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
> index e5d7ab3ce1..ffa8aa3ff4 100644
> --- a/meta/classes/pypi.bbclass
> +++ b/meta/classes/pypi.bbclass
> @@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
>  S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
>
>  UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
> -UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
> +UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
> --
> 2.20.1
>
> 
>

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

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

* Re: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on version check
       [not found] ` <160D7887899C970D.32017@lists.openembedded.org>
@ 2020-05-09 21:29   ` Tim Orling
  2020-05-10 18:40     ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Orling @ 2020-05-09 21:29 UTC (permalink / raw)
  To: Steve Sakoman, Armin Kuster, Mittal, Anuj; +Cc: openembedded-core

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

This is a candidate for backport to stable once it lands in master.

On Sat, May 9, 2020 at 2:12 PM Tim Orling via lists.openembedded.org
<ticotimo=gmail.com@lists.openembedded.org> wrote:

> This version looks good.
>
> On Sat, May 9, 2020 at 1:33 PM Konrad Weihmann <kweihmann@outlook.com>
> wrote:
>
>> Some pypi packages do have suffixes like dev, or a0 or b1.
>> When doing a version check on these, the version will get falsely
>> identified as major release versions.
>> Add a terminating slash to rule out those false positives
>>
>> Changes v2:
>>
>> - ignore suffix versions instead of reporting them
>>
>> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
>>
>
> Reviewed-by: Tim Orling <ticotimo@gmail.com>
>
> ---
>>  meta/classes/pypi.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
>> index e5d7ab3ce1..ffa8aa3ff4 100644
>> --- a/meta/classes/pypi.bbclass
>> +++ b/meta/classes/pypi.bbclass
>> @@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
>>  S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
>>
>>  UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
>> -UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
>> +UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
>> --
>> 2.20.1
>>
>>
>> 
>

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

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

* Re: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on version check
  2020-05-09 20:32 [PATCH v2] pypi.bbclass: mind package suffix on version check Konrad Weihmann
  2020-05-09 21:12 ` [OE-core] " Tim Orling
       [not found] ` <160D7887899C970D.32017@lists.openembedded.org>
@ 2020-05-10 10:40 ` Peter Kjellerstedt
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Kjellerstedt @ 2020-05-10 10:40 UTC (permalink / raw)
  To: Konrad Weihmann, openembedded-core

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Konrad Weihmann
> Sent: den 9 maj 2020 22:33
> To: openembedded-core@lists.openembedded.org
> Cc: Konrad Weihmann <kweihmann@outlook.com>
> Subject: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on
> version check
> 
> Some pypi packages do have suffixes like dev, or a0 or b1.
> When doing a version check on these, the version will get falsely
> identified as major release versions.
> Add a terminating slash to rule out those false positives
> 
> Changes v2:
> 
> - ignore suffix versions instead of reporting them

The v2 information belongs after the --- below as it relates to the 
review process.

//Peter

> 
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> ---
>  meta/classes/pypi.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
> index e5d7ab3ce1..ffa8aa3ff4 100644
> --- a/meta/classes/pypi.bbclass
> +++ b/meta/classes/pypi.bbclass
> @@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
>  S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
> 
>  UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
> -UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
> +UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
> --
> 2.20.1


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

* Re: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on version check
  2020-05-09 21:29   ` Tim Orling
@ 2020-05-10 18:40     ` Denys Dmytriyenko
  2020-05-10 18:43       ` Tim Orling
  0 siblings, 1 reply; 7+ messages in thread
From: Denys Dmytriyenko @ 2020-05-10 18:40 UTC (permalink / raw)
  To: Tim Orling; +Cc: Steve Sakoman, Armin Kuster, Mittal, Anuj, openembedded-core

On Sat, May 09, 2020 at 02:29:09PM -0700, Tim Orling wrote:
> This is a candidate for backport to stable once it lands in master.

How so?


> On Sat, May 9, 2020 at 2:12 PM Tim Orling via lists.openembedded.org
> <ticotimo=gmail.com@lists.openembedded.org> wrote:
> 
> > This version looks good.
> >
> > On Sat, May 9, 2020 at 1:33 PM Konrad Weihmann <kweihmann@outlook.com>
> > wrote:
> >
> >> Some pypi packages do have suffixes like dev, or a0 or b1.
> >> When doing a version check on these, the version will get falsely
> >> identified as major release versions.
> >> Add a terminating slash to rule out those false positives
> >>
> >> Changes v2:
> >>
> >> - ignore suffix versions instead of reporting them
> >>
> >> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> >>
> >
> > Reviewed-by: Tim Orling <ticotimo@gmail.com>
> >
> > ---
> >>  meta/classes/pypi.bbclass | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
> >> index e5d7ab3ce1..ffa8aa3ff4 100644
> >> --- a/meta/classes/pypi.bbclass
> >> +++ b/meta/classes/pypi.bbclass
> >> @@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
> >>  S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
> >>
> >>  UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/"
> >> -UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
> >> +UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
> >> --
> >> 2.20.1
> >>
> >>
> >> 
> >

> 


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

* Re: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on version check
  2020-05-10 18:40     ` Denys Dmytriyenko
@ 2020-05-10 18:43       ` Tim Orling
  2020-05-10 18:46         ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Orling @ 2020-05-10 18:43 UTC (permalink / raw)
  To: Denys Dmytriyenko
  Cc: Armin Kuster, Mittal, Anuj, Steve Sakoman, openembedded-core

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

On Sun, May 10, 2020 at 11:41 AM Denys Dmytriyenko <denis@denix.org> wrote:

> On Sat, May 09, 2020 at 02:29:09PM -0700, Tim Orling wrote:
> > This is a candidate for backport to stable once it lands in master.
>
> How so?
>

It fixes a bug in upgrade check. For users that are on stable releases, who
might be maintaining their own python packages, they will be affected by
this.


>
> > On Sat, May 9, 2020 at 2:12 PM Tim Orling via lists.openembedded.org
> > <ticotimo=gmail.com@lists.openembedded.org> wrote:
> >
> > > This version looks good.
> > >
> > > On Sat, May 9, 2020 at 1:33 PM Konrad Weihmann <kweihmann@outlook.com>
> > > wrote:
> > >
> > >> Some pypi packages do have suffixes like dev, or a0 or b1.
> > >> When doing a version check on these, the version will get falsely
> > >> identified as major release versions.
> > >> Add a terminating slash to rule out those false positives
> > >>
> > >> Changes v2:
> > >>
> > >> - ignore suffix versions instead of reporting them
> > >>
> > >> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> > >>
> > >
> > > Reviewed-by: Tim Orling <ticotimo@gmail.com>
> > >
> > > ---
> > >>  meta/classes/pypi.bbclass | 2 +-
> > >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > >>
> > >> diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
> > >> index e5d7ab3ce1..ffa8aa3ff4 100644
> > >> --- a/meta/classes/pypi.bbclass
> > >> +++ b/meta/classes/pypi.bbclass
> > >> @@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
> > >>  S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
> > >>
> > >>  UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/
> "
> > >> -UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
> > >> +UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
> > >> --
> > >> 2.20.1
> > >>
> > >>
> > >>
> > >
>
> > 
>
>

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

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

* Re: [OE-core] [PATCH v2] pypi.bbclass: mind package suffix on version check
  2020-05-10 18:43       ` Tim Orling
@ 2020-05-10 18:46         ` Denys Dmytriyenko
  0 siblings, 0 replies; 7+ messages in thread
From: Denys Dmytriyenko @ 2020-05-10 18:46 UTC (permalink / raw)
  To: Tim Orling; +Cc: Armin Kuster, Mittal, Anuj, Steve Sakoman, openembedded-core

On Sun, May 10, 2020 at 11:43:59AM -0700, Tim Orling wrote:
> On Sun, May 10, 2020 at 11:41 AM Denys Dmytriyenko <denis@denix.org> wrote:
> 
> > On Sat, May 09, 2020 at 02:29:09PM -0700, Tim Orling wrote:
> > > This is a candidate for backport to stable once it lands in master.
> >
> > How so?
> >
> 
> It fixes a bug in upgrade check. For users that are on stable releases, who
> might be maintaining their own python packages, they will be affected by
> this.

Ok, that makes sense, thanks.


> > > On Sat, May 9, 2020 at 2:12 PM Tim Orling via lists.openembedded.org
> > > <ticotimo=gmail.com@lists.openembedded.org> wrote:
> > >
> > > > This version looks good.
> > > >
> > > > On Sat, May 9, 2020 at 1:33 PM Konrad Weihmann <kweihmann@outlook.com>
> > > > wrote:
> > > >
> > > >> Some pypi packages do have suffixes like dev, or a0 or b1.
> > > >> When doing a version check on these, the version will get falsely
> > > >> identified as major release versions.
> > > >> Add a terminating slash to rule out those false positives
> > > >>
> > > >> Changes v2:
> > > >>
> > > >> - ignore suffix versions instead of reporting them
> > > >>
> > > >> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> > > >>
> > > >
> > > > Reviewed-by: Tim Orling <ticotimo@gmail.com>
> > > >
> > > > ---
> > > >>  meta/classes/pypi.bbclass | 2 +-
> > > >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >>
> > > >> diff --git a/meta/classes/pypi.bbclass b/meta/classes/pypi.bbclass
> > > >> index e5d7ab3ce1..ffa8aa3ff4 100644
> > > >> --- a/meta/classes/pypi.bbclass
> > > >> +++ b/meta/classes/pypi.bbclass
> > > >> @@ -23,4 +23,4 @@ SRC_URI += "${PYPI_SRC_URI}"
> > > >>  S = "${WORKDIR}/${PYPI_PACKAGE}-${PV}"
> > > >>
> > > >>  UPSTREAM_CHECK_URI ?= "https://pypi.python.org/pypi/${PYPI_PACKAGE}/
> > "
> > > >> -UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)"
> > > >> +UPSTREAM_CHECK_REGEX ?= "/${PYPI_PACKAGE}/(?P<pver>(\d+[\.\-_]*)+)/"
> > > >> --
> > > >> 2.20.1
> > > >>
> > > >>
> > > >>
> > > >
> >
> > > 
> >
> >

> 


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

end of thread, other threads:[~2020-05-10 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 20:32 [PATCH v2] pypi.bbclass: mind package suffix on version check Konrad Weihmann
2020-05-09 21:12 ` [OE-core] " Tim Orling
     [not found] ` <160D7887899C970D.32017@lists.openembedded.org>
2020-05-09 21:29   ` Tim Orling
2020-05-10 18:40     ` Denys Dmytriyenko
2020-05-10 18:43       ` Tim Orling
2020-05-10 18:46         ` Denys Dmytriyenko
2020-05-10 10:40 ` Peter Kjellerstedt

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.