1 |
El mar, 01-01-2013 a las 16:01 -0800, Zac Medico escribió: |
2 |
> On 01/01/2013 05:39 AM, Pacho Ramos wrote: |
3 |
> > El mar, 01-01-2013 a las 14:32 +0100, Pacho Ramos escribió: |
4 |
> >> pkg_postinst() { |
5 |
> >> @@ -48,6 +56,8 @@ |
6 |
> >> elog |
7 |
> >> fi |
8 |
> >> |
9 |
> >> + echo ${CONFIGURATION_INSTRUCTIONS} | fmt | while read -s ELINE; do |
10 |
> >> elog "${ELINE}"; done |
11 |
> >> + |
12 |
> >> # files/systemd/acpid.socket -> ListenStream=/run/acpid.socket |
13 |
> >> mkdir -p "${ROOT}"/run |
14 |
> >> |
15 |
> >> This could probably be moved to eutils.eclass to use it on this kind of |
16 |
> >> ebuilds |
17 |
> > |
18 |
> > Well, "elog" part should be behind: |
19 |
> > if ! has_version "${CATEGORY}/${PN}"; then |
20 |
> > echo ${CONFIGURATION_INSTRUCTIONS} | fmt | while read -s ELINE; do elog |
21 |
> > "${ELINE}"; done |
22 |
> > fi |
23 |
> > |
24 |
> |
25 |
> Not that `has_version "${CATEGORY}/${PN}"` is always true in |
26 |
> pkg_postinst, since the package is already installed. So, you should |
27 |
> choose one of these alternatives for it to work as intended: |
28 |
> |
29 |
> 1) call has_version in pkg_preinst |
30 |
> 2) use [[ ${REPLACING_VERSIONS} ]] instead |
31 |
> |
32 |
|
33 |
Yeah, that is true (and looks like current acpid ebuild is buggy in |
34 |
this). I wouldn't have any problem on either solution, but using first |
35 |
one would work in all eapis, is there any reason for printing this kind |
36 |
of messages in pkg_postinst? |