Mail archive
alpine-devel

Re: [alpine-devel] Script to parse APKBUILDS and output table of arch support

From: Jakub Jirutka <jakub_at_jirutka.cz>
Date: Tue, 20 Jun 2017 18:06:28 +0200

Hi,

seding APKBUILDs is not a very good approach how to gather this information. That said, it can quite work in this case, for “arch”, because this is rarely (if ever) dynamic (e.g. adding archs based on some conditions) or variously formatted, but not for all variables.

We already have library for sort of programmatic reading of APKBUILDs: https://github.com/alpinelinux/lua-aports <https://github.com/alpinelinux/lua-aports>. It basically just evaluates every APKBUILD, prints and parsers the selected variables. This is used e.g. in pkgs.a.o.

I agree that such reports would be useful for maintainers for recently added platforms. However, there are much more reports that would be useful, so it’d be better to separate data and presentation. I mean, create a simple RESTful API for aports or just some JSON export, so anyone can make whatever report needs, without parsing APKBUILDs over and over again. This is yet another thing on my very long TODO list… Hm, maybe this week. It’s pity that we are so dislocated over the planet, some local hackathons may be very productive for such tasks. :)

Jakub

> On 20. Jun 2017, at 16:21, Tmp File <tmpfile_at_mail.com> wrote:
>
> Good morning Alpiners.
>
> I wrote a shell script that reads all APKBUILDS on a repository, parses the arch= setting, and output a csv table with detailed information about which package is supported by which architecture.
>
> https://github.com/tmpfile/table
>
> It outputs a complete table and also a table of only packages that aren't supported for all archs.
>
> Here's the final result: https://github.com/tmpfile/table/blob/master/missing_support_table.csv
>
> I think this can be of great help to arch maintainers so they can know with more ease which packages they must work on.
>
> My goal sharing this work is that someone implements it as a cron job (for example) on alpinelinux.org/table.html or some other address.
>
> In the testing I parsed only main/ but it should also work for community/ and /testing.
>
> Let me know your opinion.
>
> tmpfile
>
> --- Unsubscribe: alpine-devel+unsubscribe_at_lists.alpinelinux.org Help: alpine-devel+help_at_lists.alpinelinux.org ---




---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Jun 20 2017 - 18:06:28 UTC