1 |
On 12/31/2012 05:21 AM, Pacho Ramos wrote: |
2 |
> pkg_postinst() { |
3 |
> |
4 |
> Some improvements I am not sure how to implement just now: |
5 |
> - What would be the proper way to "elog" contents |
6 |
> of /usr/share/doc/${PF}/CONFIGURATION.bz2 and, then, allow the following |
7 |
> to be shorter: |
8 |
> |
9 |
> if ! has_version 'sys-power/acpid'; then |
10 |
> elog |
11 |
> elog "You may wish to read the Gentoo Linux Power Management Guide," |
12 |
> elog "which can be found online at:" |
13 |
> elog "http://www.gentoo.org/doc/en/power-management-guide.xml" |
14 |
> elog |
15 |
> fi |
16 |
> ? |
17 |
> |
18 |
> Thanks for your help |
19 |
> |
20 |
|
21 |
It seems that you're allowed to call the unpack() function in any phase, |
22 |
so something like this should work: |
23 |
|
24 |
cd "${T}" |
25 |
cp "${EROOT}/usr/share/doc/${PF}/CONFIGURATION"* ./ |
26 |
[ -f ./CONFIGURATION ] || unpack ./CONFIGURATION* |
27 |
elog "$(< ./CONFIGURATION)" |
28 |
|
29 |
|
30 |
-- |
31 |
Thanks, |
32 |
Zac |