1 |
El dom, 30-12-2012 a las 00:09 +0100, Pacho Ramos escribió: |
2 |
[...] |
3 |
> > I want to have a permanent reference of current elog messages simply |
4 |
> > showing configuration tips to: |
5 |
> > 1. Show them via elog messages only first time package is installed |
6 |
> > 2. Not need to read ebuild directly once people remove summary.log |
7 |
> > |
8 |
|
9 |
This would be the idea (applied in this example to acpid package) |
10 |
--- /home/pacho/gentoo-x86/sys-power/acpid/acpid-2.0.17.ebuild |
11 |
2012-11-26 09:20:15.000000000 +0100 |
12 |
+++ ./acpid-2.0.17.ebuild 2012-12-31 14:18:41.000000000 +0100 |
13 |
@@ -37,6 +37,13 @@ |
14 |
newconfd "${FILESDIR}"/${PN}-2.0.16-conf.d ${PN} |
15 |
|
16 |
systemd_dounit "${FILESDIR}"/systemd/${PN}.{service,socket} |
17 |
+ |
18 |
+ cat > CONFIGURATION <<-EOF |
19 |
+ You may wish to read the Gentoo Linux Power Management Guide, |
20 |
+ which can be found online at: |
21 |
+ http://www.gentoo.org/doc/en/power-management-guide.xml |
22 |
+ EOF |
23 |
+ dodoc CONFIGURATION |
24 |
} |
25 |
|
26 |
pkg_postinst() { |
27 |
|
28 |
Some improvements I am not sure how to implement just now: |
29 |
- What would be the proper way to "elog" contents |
30 |
of /usr/share/doc/${PF}/CONFIGURATION.bz2 and, then, allow the following |
31 |
to be shorter: |
32 |
|
33 |
if ! has_version 'sys-power/acpid'; then |
34 |
elog |
35 |
elog "You may wish to read the Gentoo Linux Power Management Guide," |
36 |
elog "which can be found online at:" |
37 |
elog "http://www.gentoo.org/doc/en/power-management-guide.xml" |
38 |
elog |
39 |
fi |
40 |
? |
41 |
|
42 |
Thanks for your help |