Mail archive
alpine-devel

Re: [alpine-devel] Extend APKBUILD format with a variable to check framework versions

From: Oliver Smith <ollieparanoid_at_bitmessage.ch>
Date: Thu, 14 Mar 2019 23:14:00 +0000

Hello Natanael,

> I looked at the script and tested it a bit. A few general comments:>
> - Would be nice to be able to specify APORTS dir as an arg, and if its
> omitted (and $APORTS is empty) then use current dir.

done

> - I like that you use `find` to find the APKBUILDs
>
> - I think we may need parse/execute the entire APKBUILD to get the
> relgroup, so that things like relgroup=qt${pkgver%%.*} works.

So right now the script limits how the relgroup lines may look like with
a regex. It checks for any invalid relgroup lines and errors out as
necessary before it actually reads all relgroups from the APKBUILDs.
Thanks to the simple format, both steps can be done with grep and should
therefore be a lot faster than actually parsing each APKBUILD. (At least
that's my assumption. I could do some benchmarks if anybody doubts this.)

That means we would need to write 'relgroup="qt5"' in the given example.

What do you think, is this a good trade-off between speed and writing
anything you want in relgroup?

> - the script is a bit slow. Probably because there are forks for each
> APKBUILD.

Just to clarify: it only sources the APKBUILDs where it found out with
grep, that it has a relgroup. In order to parse the pkgver properly.

On my laptop (with SSD) and a few relgroups added to Alpine's
aports.git, it takes 3.9 seconds after a fresh boot. (All subsequent
calls take about 0.4 seconds due to caching.)

I'm not sure if we could speed it up more, suggestions welcome.

> Sounds like a good idea to keep it in the alpinelinux' org. I don't
> know if we want keep it on git.alpinelinux.org? What does infra team
> think?

Not that you have asked me, but I think it is good for consistency.

Thanks for your review and testing!

Cheers,
Oliver



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Thu Mar 14 2019 - 23:14:00 UTC