All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org
@ 2021-09-01 14:10 Francois Perrad
  2021-10-19  6:09 ` François Perrad
  2021-10-19 20:06 ` Yann E. MORIN
  0 siblings, 2 replies; 4+ messages in thread
From: Francois Perrad @ 2021-09-01 14:10 UTC (permalink / raw)
  To: buildroot

for example with libpng: 1.6.37 instead of 1.7.0beta89

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 support/scripts/pkg-stats | 1 +
 1 file changed, 1 insertion(+)

diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index cc91d1316..249cc6afe 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -485,6 +485,7 @@ async def check_package_get_latest_version_by_distro(session, pkg, retry=True):
 
             data = await resp.json()
             version = data['version'] if 'version' in data else None
+            version = data['stable_versions'][0] if 'stable_versions' in data else version
             check_package_latest_version_set_status(pkg,
                                                     RM_API_STATUS_FOUND_BY_DISTRO,
                                                     version,
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org
  2021-09-01 14:10 [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org Francois Perrad
@ 2021-10-19  6:09 ` François Perrad
  2021-10-19 20:06 ` Yann E. MORIN
  1 sibling, 0 replies; 4+ messages in thread
From: François Perrad @ 2021-10-19  6:09 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 976 bytes --]

ping

Le mer. 1 sept. 2021 à 16:10, Francois Perrad <fperrad@gmail.com> a écrit :

> for example with libpng: 1.6.37 instead of 1.7.0beta89
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  support/scripts/pkg-stats | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
> index cc91d1316..249cc6afe 100755
> --- a/support/scripts/pkg-stats
> +++ b/support/scripts/pkg-stats
> @@ -485,6 +485,7 @@ async def
> check_package_get_latest_version_by_distro(session, pkg, retry=True):
>
>              data = await resp.json()
>              version = data['version'] if 'version' in data else None
> +            version = data['stable_versions'][0] if 'stable_versions' in
> data else version
>              check_package_latest_version_set_status(pkg,
>
>  RM_API_STATUS_FOUND_BY_DISTRO,
>                                                      version,
> --
> 2.30.2
>
>

[-- Attachment #1.2: Type: text/html, Size: 1564 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org
  2021-09-01 14:10 [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org Francois Perrad
  2021-10-19  6:09 ` François Perrad
@ 2021-10-19 20:06 ` Yann E. MORIN
  2021-10-25 12:29   ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-10-19 20:06 UTC (permalink / raw)
  To: Francois Perrad; +Cc: buildroot

François, All,

On 2021-09-01 16:10 +0200, Francois Perrad spake thusly:
> for example with libpng: 1.6.37 instead of 1.7.0beta89
> 
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  support/scripts/pkg-stats | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
> index cc91d1316..249cc6afe 100755
> --- a/support/scripts/pkg-stats
> +++ b/support/scripts/pkg-stats
> @@ -485,6 +485,7 @@ async def check_package_get_latest_version_by_distro(session, pkg, retry=True):
>  
>              data = await resp.json()
>              version = data['version'] if 'version' in data else None
> +            version = data['stable_versions'][0] if 'stable_versions' in data else version

I've changed that to fit all in a single line:

    version = data['stable_versions'][0] if 'stable_versions' in data else data['version'] if 'version' in data else None

And it all fits in the allowed 132-char limit! :-)

Applied to master, thanks.

Regards,
Yann E. MORIN.

>              check_package_latest_version_set_status(pkg,
>                                                      RM_API_STATUS_FOUND_BY_DISTRO,
>                                                      version,
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org
  2021-10-19 20:06 ` Yann E. MORIN
@ 2021-10-25 12:29   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2021-10-25 12:29 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot, Francois Perrad

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > François, All,
 > On 2021-09-01 16:10 +0200, Francois Perrad spake thusly:
 >> for example with libpng: 1.6.37 instead of 1.7.0beta89
 >> 
 >> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
 >> ---
 >> support/scripts/pkg-stats | 1 +
 >> 1 file changed, 1 insertion(+)
 >> 
 >> diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
 >> index cc91d1316..249cc6afe 100755
 >> --- a/support/scripts/pkg-stats
 >> +++ b/support/scripts/pkg-stats
 >> @@ -485,6 +485,7 @@ async def check_package_get_latest_version_by_distro(session, pkg, retry=True):
 >> 
 >> data = await resp.json()
 >> version = data['version'] if 'version' in data else None
 >> +            version = data['stable_versions'][0] if 'stable_versions' in data else version

 > I've changed that to fit all in a single line:

 >     version = data['stable_versions'][0] if 'stable_versions' in data else data['version'] if 'version' in data else None

 > And it all fits in the allowed 132-char limit! :-)

;)

NIT: dict.get is handy for such use cases, E.G.

version = data.get('version')

is equivalent but quite a bit easier to read than:

version = data['version'] if 'version' in data else None


For this change I guess we could look at versions instead of version and
do something like:

# first element is the latest version
version = data.get('stable_versions', data.get('versions', [None]))[0]

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-10-25 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 14:10 [Buildroot] [PATCH v2] support/scripts/pkg-stats: prefers stable version from release-monitoring.org Francois Perrad
2021-10-19  6:09 ` François Perrad
2021-10-19 20:06 ` Yann E. MORIN
2021-10-25 12:29   ` Peter Korsgaard

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.