1 |
For historical curiosity there was also |
2 |
https://github.com/domenkozar/g-pypi at one point (similar to |
3 |
https://github.com/rafaelmartins/g-octave). Having used g-octave, the |
4 |
primary issue is as Michał says, there are a lot of corner cases that |
5 |
the generation doesn't handle correctly which lead to broken ebuilds |
6 |
and maintenance headaches. Speaking for python, catching and |
7 |
correcting the use of setup_requires and other insanity visited upon |
8 |
us by the wonders of setuptools makes this a non-starter. If you have |
9 |
a set a known sane packages you could in theory write an eclass that |
10 |
captures the regularities of those packages, but I'm not sure eclasses |
11 |
are suggested for that use case. |
12 |
Tom |
13 |
|
14 |
On Mon, Feb 3, 2020 at 5:27 AM Michał Górny <mgorny@g.o> wrote: |
15 |
> |
16 |
> On Mon, 2020-02-03 at 14:20 +0100, Gerion Entrup wrote: |
17 |
> > Am Montag, 3. Februar 2020, 13:19:52 CET schrieb Benda Xu: |
18 |
> > > Hi Gerion, |
19 |
> > > |
20 |
> > > Gerion Entrup <gerion.entrup@×××××.de> writes: |
21 |
> > > |
22 |
> > > > > Yes, that makes a lot of sense. The R overlay follows this model. Most |
23 |
> > > > > of the ebuilds are automated. When an ebuild generation fails, we add |
24 |
> > > > > the ebuild manually, understand it and then update the generator to |
25 |
> > > > > cover it in the future. |
26 |
> > > > |
27 |
> > > > Is this possible in all cases? I think of adding custom patches, |
28 |
> > > > appropriate mapping of dependencies, check for things like desktop |
29 |
> > > > icon cache... |
30 |
> > > |
31 |
> > > That's too complex to handle automatically. Luckily, in R overlay, such |
32 |
> > > packages are less than 5%. An ebuild generator is based on the |
33 |
> > > observation that many language-specific packages are trivial to fetch, |
34 |
> > > compile and install. |
35 |
> > > |
36 |
> > > > > > I'm only "maintaining" an overlay so maybe I'm missing experience |
37 |
> > > > > > but I often have wished a tool that automatically parses the language specific |
38 |
> > > > > > packaging files and is able to generate a primitive ebuild out of that. |
39 |
> > > > > > Maybe it even can do this in an interactive way: |
40 |
> > > > > > "Hey, upstream needs the dependency 'foo'. In the Gentoo packages I have found |
41 |
> > > > > > 'dev-bar/foo' and 'dev-util/foo'. What is the correct one?" |
42 |
> > > > > |
43 |
> > > > > Yes, that's the way R overlay is working. And I have a similar plan and |
44 |
> > > > > proof-of-concept solution for the Java Maven overlay. |
45 |
> > > > |
46 |
> > > > Nice to hear. I think, it is meaningful to solve all generation with one |
47 |
> > > > tool. Maybe it can even "recognize" the used build system and package |
48 |
> > > > database. Is this your plan, too? |
49 |
> > > |
50 |
> > > No, I don't think it possible as far as I can see... That would be a |
51 |
> > > strong AI. |
52 |
> > I mean only on a primitive base: |
53 |
> > ``` |
54 |
> > if link contains "pypi": |
55 |
> > # it's a Python package from pypi |
56 |
> > handle_pypi() |
57 |
> > elif work_tree contains "setup.py": |
58 |
> > # it's a Python package |
59 |
> > handle_generic_python() |
60 |
> > |
61 |
> |
62 |
> Please don't use generators for Python. You'd have to put a lot of |
63 |
> effort to get things right. Most of the time, you'll end up with broken |
64 |
> or no tests, useless deps and py2 where unnecessary. |
65 |
> |
66 |
> Creating ebuilds is not a problem. Maintaining is. Python team ended |
67 |
> up with lots of packages dumped by former project members or other |
68 |
> developers. Many of them are of very bad quality. Even those that |
69 |
> aren't are a maintenance burden. Removing broken and/or useless |
70 |
> packages is taking a lot of our time. |
71 |
> |
72 |
> -- |
73 |
> Best regards, |
74 |
> Michał Górny |
75 |
> |