[Buildroot] [PATCH v5] support/scripts/pkg-stats: add latest upstream version information

Brandon Maier brandon.maier at rockwellcollins.com
Fri Jan 4 14:54:52 UTC 2019


On Thu, Jan 3, 2019 at 2:38 AM Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
...
> +    if len(data['versions']) > 0:
> +        return (RM_API_STATUS_FOUND_BY_DISTRO, data['versions'][0], data['id'])
> +    else:
> +        return (RM_API_STATUS_FOUND_BY_DISTRO, None, data['id'])
> +
...
> +    for p in data['projects']:
> +        if p['name'] == name and len(p['versions']) > 0:
> +            return (RM_API_STATUS_FOUND_BY_PATTERN, p['versions'][0], p['id'])
> +

In these two places, instead of using "versions", could we use
"version"? It looks like the first item in "versions" isn't always
correct. For example see cdrkit. I did a mock API call with Postman
and there's a separate "version" field without the prefix.

Here's what a GET to
https://release-monitoring.org/api/projects/?pattern=cdrkit returns:
{
    "projects": [
        {
            "backend": "GitHub",
            "created_on": 1460976471,
            "ecosystem": "https://github.com/Distrotech/cdrkit",
            "homepage": "https://github.com/Distrotech/cdrkit",
            "id": 10520,
            "name": "cdrkit",
            "regex": null,
            "updated_on": 1533644065,
            "version": "1.1.11",
            "version_url": "Distrotech/cdrkit",
            "versions": [
                "release_1.1.11",
                "1.1.11"
            ]
        }
    ],
    "total": 1
}

Otherwise I ran the script on my setup and everything looks good.
Reviewed-By: Brandon Maier <brandon.maier at rockwellcollins.com>



More information about the buildroot mailing list