Gentoo Archives: gentoo-dev

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

Replies

Subject Author
Re: [gentoo-dev] EAPI 7, BDEPEND and pkg_*inst Zac Medico <zmedico@g.o>
Re: [gentoo-dev] EAPI 7, BDEPEND and pkg_*inst "Michał Górny" <mgorny@g.o>