Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o, Michael Haubenwallner <haubi@g.o>
Subject: Re: [gentoo-dev] EAPI 7, BDEPEND and pkg_*inst
Date: Wed, 30 May 2018 22:58:30
Message-Id: 8064914a-1e9a-b773-e03a-fe5a3c77fcdb@gentoo.org
In Reply to: [gentoo-dev] EAPI 7, BDEPEND and pkg_*inst by Michael Haubenwallner
1 On 05/30/2018 04:49 AM, Michael Haubenwallner wrote:
2 > Hi,
3 >
4 > HOORAY, seems like EAPI 7 might be able to obsolete the "prefix-chaining"
5 > portage patch I've carried in prefix-overlay all the time, thank you for that!
6 >
7 > However, a first thing being unclear already came up when bumping EAPI 6 to 7:
8 >
9 > For example, the current app-misc/ca-certificates ebuild (EAPI 6) contains:
10 >
11 > # c_rehash: we run `c_rehash`
12 > # debianutils: we run `run-parts`
13 > RDEPEND="${DEPEND}
14 > app-misc/c_rehash
15 > sys-apps/debianutils"
16 >
17 > pkg_postinst() {
18 > if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
19 > # if the user has local certs, we need to rebuild again
20 > # to include their stuff in the db.
21 > # However it's too overzealous when the user has custom certs in place.
22 > # --fresh is to clean up dangling symlinks
23 > "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}"
24 > fi
25 > }
26 >
27 > Thing is, these RDEPENDs are not really required to "run" ca-certificates, but to
28 > administrate it - which eventually is done on the CBUILD machine (from within the
29 > ebuild, like in pkg_postinst currently), not necessarily on the CHOST machine.
30 >
31 > So I do not necessarily want these RDEPENDs to be installed on the CHOST machine,
32 > given that they may not be executed from within the CBUILD machine at all.
33 >
34 > So the first idea is to move both RDEPENDs into BDEPEND. But then, they are
35 > not guaranteed to be available during pkg_postinst - like for a binary package.
36
37 Right, so it really belongs in RDEPEND *and* BDEPEND.
38
39 > Question now is: Is this wrong behaviour in the ebuild,
40 > or is this something where EAPI 7 is still insufficient for?
41
42 If we want to tune the dependencies more finely, we'll need new EAPI.
43
44 > When this is wrong (probably independent of EAPI 7 already) in the ebuild:
45 > How can the ebuild get such a use case right, especially with EAPI 7?
46
47 What's wrong with putting it in both?
48
49 > Thanks!
50 > /haubi/
51 >
52 --
53 Thanks,
54 Zac

Replies

Subject Author
Re: [gentoo-dev] EAPI 7, BDEPEND and pkg_*inst Michael Haubenwallner <haubi@g.o>