Gentoo Archives: gentoo-dev

From: Gerion Entrup <gerion.entrup@×××××.de>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Ebuild Generators
Date: Mon, 03 Feb 2020 13:19:58
Message-Id: 12449796.uLZWGnKmhe@falbala
In Reply to: Re: [gentoo-dev] Ebuild Generators by Benda Xu
1 Am Montag, 3. Februar 2020, 13:19:52 CET schrieb Benda Xu:
2 > Hi Gerion,
3 >
4 > Gerion Entrup <gerion.entrup@×××××.de> writes:
5 >
6 > >> Yes, that makes a lot of sense. The R overlay follows this model. Most
7 > >> of the ebuilds are automated. When an ebuild generation fails, we add
8 > >> the ebuild manually, understand it and then update the generator to
9 > >> cover it in the future.
10 > >
11 > > Is this possible in all cases? I think of adding custom patches,
12 > > appropriate mapping of dependencies, check for things like desktop
13 > > icon cache...
14 >
15 > That's too complex to handle automatically. Luckily, in R overlay, such
16 > packages are less than 5%. An ebuild generator is based on the
17 > observation that many language-specific packages are trivial to fetch,
18 > compile and install.
19 >
20 > >> > I'm only "maintaining" an overlay so maybe I'm missing experience
21 > >> > but I often have wished a tool that automatically parses the language specific
22 > >> > packaging files and is able to generate a primitive ebuild out of that.
23 > >> > Maybe it even can do this in an interactive way:
24 > >> > "Hey, upstream needs the dependency 'foo'. In the Gentoo packages I have found
25 > >> > 'dev-bar/foo' and 'dev-util/foo'. What is the correct one?"
26 > >>
27 > >> Yes, that's the way R overlay is working. And I have a similar plan and
28 > >> proof-of-concept solution for the Java Maven overlay.
29 > >
30 > > Nice to hear. I think, it is meaningful to solve all generation with one
31 > > tool. Maybe it can even "recognize" the used build system and package
32 > > database. Is this your plan, too?
33 >
34 > No, I don't think it possible as far as I can see... That would be a
35 > strong AI.
36 I mean only on a primitive base:
37 ```
38 if link contains "pypi":
39 # it's a Python package from pypi
40 handle_pypi()
41 elif work_tree contains "setup.py":
42 # it's a Python package
43 handle_generic_python()
44 elif work_tree contains "meson.build":
45 handle_meson_package()
46 ...
47 ```
48
49 Best,
50 Gerion

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Ebuild Generators "Michał Górny" <mgorny@g.o>