From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23124 invoked from network); 3 Sep 2004 13:39:08 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 3 Sep 2004 13:39:08 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.34) id 1C3EHT-0004E1-QU for arch-gentoo-dev@lists.gentoo.org; Fri, 03 Sep 2004 13:39:07 +0000 Received: (qmail 25624 invoked by uid 89); 3 Sep 2004 13:39:07 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 26571 invoked from network); 3 Sep 2004 13:39:06 +0000 From: Eldad Zack To: Nicholas Jones Cc: Gentoo-Dev In-Reply-To: <20040903051038.GA11426@twobit.net> References: <1094155935.19504.40.camel@localhost> <20040903051038.GA11426@twobit.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-VbDulZyE6Ve0GZSzR3VN" Message-Id: <1094224207.7076.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 03 Sep 2004 18:10:08 +0300 Subject: Re: [gentoo-dev] Package notices X-Archives-Salt: 702cce27-5ef4-4602-8626-e4e2b3853956 X-Archives-Hash: cf9d2a3c3920536c89e001a873560067 --=-VbDulZyE6Ve0GZSzR3VN Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2004-09-03 at 08:10, Nicholas Jones wrote: > functions.sh (from baselayout) dependence needs to go away. > All used functions need to be logged/rewritten to not use those > functions, and instead maintain its own. I propose overriding einfo/... after sourcing functions.sh in ebuild.sh. > All said functions must be rewritten, for portage, with the > capability to handle colors and terminals and the like as > portage does currently. (People don't want ANSI in their logs.) Logfiles are handled seperately while screen output uses ANSI. If portage could relay the color decision onwards to bash, it would take only a small change to enforce that. > ${T}/notices.${PF}.${TYPE} I'd rather use a single file - notices.${PF} as the code shows: (should be inserted in ebuild.sh after functions.sh is sourced) ### Code start ### einfo() { enotice info "${*}" } ewarn() { enotice warn "${*}" } eerror() { enotice error "${*}" } enotice() { local color local type type=3D"${1}" case "${type}" in "info") color=3D"${GOOD}" ;; "warn") color=3D"${WARN}" ;; "error") color=3D"${BAD}" ;; esac shift echo "[${type}] ${*}" >> ${T}/notices.${PF} echo " ${color}*${NORMAL} ${*}" } ### Code End ### You can also merge the notice file into the package inself: (inside dyn_install, just after calling src_install) #enotice if [ -n ${PORT_ENOTICE_DIR} && -r ${T}/notices.${PF} ] then install -d ${D}${PORT_ENOTICE_DIR} cp ${T}/notices.${PF} ${D}${PORT_ENOTICE_DIR} fi or any other way you think is best. If this is acceptable, I can write a matching notice reader. --=20 Eldad Zack Key/Fingerprint at pgp.mit.edu, ID 0x96EA0A93 --=-VbDulZyE6Ve0GZSzR3VN Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBOIlPT+MN7JbqCpMRAoq/AJwIhYDXj+JESD6csUE9f5xYZnnTwwCfYu0X bjXpGLhkesI91U6IaxBXYSw= =sT8R -----END PGP SIGNATURE----- --=-VbDulZyE6Ve0GZSzR3VN--