[Pkg-raspi-maintainers] Proposal: pythonize recipe generation

Diederik de Haas didi.debian at cknow.org
Sat Aug 28 08:44:58 BST 2021


On zaterdag 28 augustus 2021 06:32:52 CEST Cyril Brulebois wrote:
> It seems we keep stumbling upon the same kind of issues over and over
> ...
> Upon the past few days, it occurred to me we could just declare a few
> variables based on appropriate conditions on Pi family and Debian
> release, and use a non-shell-based approach to string replacement.
> 
> I've implemented a little proof of concept in Python

I will surely look at your proposal and also properly evaluate dilinger's 
suggestion, but since you brought up Python ...

https://salsa.debian.org/freedombox-team/freedom-maker/
Freedom Maker may even be 'more radical', but they forked vmdb2 and 
implemented support for various boards in Python.
There is (doing this from memory, so may be off a bit) f.e. an ArmBuilder and 
an Arm64Builder which inherits from the ArmBuilder.
And then it goes turtles all the way down.

Implement things once and when/if needed override only specific parts. Or add 
board (maker) specific parts to their own class(es).
And use inheritance. This is a great approach imo.

I still have to study it further/proper, but wanted to make you and the list 
at least aware of it.

Cheers,
  Diederik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/pkg-raspi-maintainers/attachments/20210828/5f157263/attachment.sig>


More information about the Pkg-raspi-maintainers mailing list