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