1 |
On Thu, Dec 19, 2019 at 2:40 PM Michał Górny <mgorny@g.o> wrote: |
2 |
> |
3 |
> Hello, |
4 |
> |
5 |
> Here's another potential EAPI 8 feature I'd like to discuss. Please |
6 |
> note that this is about *new dependency type*, so please don't hijack it |
7 |
> into the big 'let's steal Exherbo syntax' debate. |
8 |
> |
9 |
> Bug: https://bugs.gentoo.org/660306 |
10 |
> |
11 |
> |
12 |
> The problem |
13 |
> =========== |
14 |
> |
15 |
> Right now we don't really have a clean way of specifying dependencies |
16 |
> that are used during pkg_*inst (and pkg_*rm?) phases. So far RDEPEND |
17 |
> was used as a 'close enough' alternative (except for a few developers |
18 |
> who rejected it as 'invalid' and used DEPEND which is even more wrong). |
19 |
> However, this is no longer sufficient with EAPI 7 cross support. |
20 |
> |
21 |
> By design, pkg_*inst phases are run in build host's environment when |
22 |
> cross is used (because obviously you can't run target host executables). |
23 |
> Therefore, the relevant dependencies need to be installed into CBUILD |
24 |
> root, while RDEPEND is installed into CHOST root. |
25 |
> |
26 |
> |
27 |
> The proposed solution |
28 |
> ===================== |
29 |
> |
30 |
> The proposal is to add a new dependency type (codename: IDEPEND) which |
31 |
> indicates dependencies used for pkg_*inst (and pkg_*rm?) phases. Those |
32 |
> dependencies would be installed into CBUILD root (like BDEPEND), and |
33 |
> therefore would be runnable from build host. Similarly to RDEPEND, they |
34 |
> would be installed for binary package installs but not for pure binpkg |
35 |
> builds (without install). |
36 |
> |
37 |
> Example: |
38 |
> |
39 |
> inherit xdg-utils |
40 |
> |
41 |
> IDEPEND="dev-util/desktop-file-utils" |
42 |
> |
43 |
> pkg_postinst() { |
44 |
> xdg_desktop_database_update |
45 |
> } |
46 |
> |
47 |
> |
48 |
> WDYT? |
49 |
|
50 |
Sounds good to me. |