1 |
Hello, |
2 |
|
3 |
After adding python_gen_any_dep to solve issues with dependencies of |
4 |
python-any-r1 packages, there's yet another thing that needs some of |
5 |
our attention. |
6 |
|
7 |
Most of python-any-r1 ebuilds use Python during build-time only. I'm |
8 |
not aware of a single python-any-r1 ebuild that would use Python during |
9 |
pkg_* functions. This means that a typical python-any-r1 ebuild would |
10 |
need to: |
11 |
|
12 |
pkg_setup() { |
13 |
[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup |
14 |
} |
15 |
|
16 |
As you can guess, only a few ebuilds actually do that, and it's not |
17 |
really friendly to repeat that over and over again. |
18 |
|
19 |
While having this snippet missing usually doesn't cause much bad, it |
20 |
can be quite hurtful to binary packages in the future. Most |
21 |
importantly, when an ebuild uses uncommon version of Python during |
22 |
build time, the binary package will fail to install -- |
23 |
python-any-r1_pkg_setup will bail out being unable to find supported |
24 |
Python. |
25 |
|
26 |
Therefore, I think it would be beneficial to add the MERGE_TYPE check |
27 |
inside pkg_setup. In case someone needs Python during binary package |
28 |
install, we can (likely in the future): |
29 |
|
30 |
1. add a variable to disable the MERGE_TYPE check, |
31 |
|
32 |
2. add a new function that does the actual Python setup and make |
33 |
the default pkg_setup() a common-case wrapper for it. |
34 |
|
35 |
What are your thoughts? |
36 |
|
37 |
-- |
38 |
Best regards, |
39 |
Michał Górny |