Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: Pacho Ramos <pacho@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] About using a CONFIGURATION (or SETUP) file under /usr/share/doc for configuration information
Date: Wed, 02 Jan 2013 00:02:49
Message-Id: 50E378EF.8030305@gentoo.org
In Reply to: Re: [gentoo-dev] About using a CONFIGURATION (or SETUP) file under /usr/share/doc for configuration information by Pacho Ramos
1 On 01/01/2013 05:39 AM, Pacho Ramos wrote:
2 > El mar, 01-01-2013 a las 14:32 +0100, Pacho Ramos escribió:
3 >> pkg_postinst() {
4 >> @@ -48,6 +56,8 @@
5 >> elog
6 >> fi
7 >>
8 >> + echo ${CONFIGURATION_INSTRUCTIONS} | fmt | while read -s ELINE; do
9 >> elog "${ELINE}"; done
10 >> +
11 >> # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket
12 >> mkdir -p "${ROOT}"/run
13 >>
14 >> This could probably be moved to eutils.eclass to use it on this kind of
15 >> ebuilds
16 >
17 > Well, "elog" part should be behind:
18 > if ! has_version "${CATEGORY}/${PN}"; then
19 > echo ${CONFIGURATION_INSTRUCTIONS} | fmt | while read -s ELINE; do elog
20 > "${ELINE}"; done
21 > fi
22 >
23
24 Not that `has_version "${CATEGORY}/${PN}"` is always true in
25 pkg_postinst, since the package is already installed. So, you should
26 choose one of these alternatives for it to work as intended:
27
28 1) call has_version in pkg_preinst
29 2) use [[ ${REPLACING_VERSIONS} ]] instead
30
31 --
32 Thanks,
33 Zac

Replies