[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: Re: [gentoo-dev] About using a CONFIGURATION (or SETUP) file under /usr/share/doc for configuration
From: Zac Medico <zmedico () gentoo ! org>
Date: 2012-12-31 22:53:31
Message-ID: 50E2176B.5020703 () gentoo ! org
[Download RAW message or body]
On 12/31/2012 05:21 AM, Pacho Ramos wrote:
> pkg_postinst() {
>
> Some improvements I am not sure how to implement just now:
> - What would be the proper way to "elog" contents
> of /usr/share/doc/${PF}/CONFIGURATION.bz2 and, then, allow the following
> to be shorter:
>
> if ! has_version 'sys-power/acpid'; then
> elog
> elog "You may wish to read the Gentoo Linux Power Management Guide,"
> elog "which can be found online at:"
> elog "http://www.gentoo.org/doc/en/power-management-guide.xml"
> elog
> fi
> ?
>
> Thanks for your help
>
It seems that you're allowed to call the unpack() function in any phase,
so something like this should work:
cd "${T}"
cp "${EROOT}/usr/share/doc/${PF}/CONFIGURATION"* ./
[ -f ./CONFIGURATION ] || unpack ./CONFIGURATION*
elog "$(< ./CONFIGURATION)"
--
Thanks,
Zac
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic