From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 55F0F13874B for ; Tue, 29 Jan 2013 21:47:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8CD1621C014; Tue, 29 Jan 2013 21:47:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 960CAE0281 for ; Tue, 29 Jan 2013 21:47:34 +0000 (UTC) Received: from [192.168.1.33] (210.Red-2-137-15.dynamicIP.rima-tde.net [2.137.15.210]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pacho) by smtp.gentoo.org (Postfix) with ESMTPSA id DA1FE33DB84 for ; Tue, 29 Jan 2013 21:47:31 +0000 (UTC) Subject: Re: readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable= From: Pacho Ramos To: gentoo-dev@lists.gentoo.org In-Reply-To: References: <1359295221.2927.24.camel@belkin4> <201301271305.54346.vapier@gentoo.org> <1359310887.2927.39.camel@belkin4> <201301272337.06614.vapier@gentoo.org> <1359401406.2927.49.camel@belkin4> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-vc7kxF/F3x0hT3DRw+wa" Date: Tue, 29 Jan 2013 22:47:26 +0100 Message-ID: <1359496046.2927.55.camel@belkin4> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 X-Archives-Salt: 9b1c3d10-25f8-459b-bf87-b552f22c28de X-Archives-Hash: a52c9d35daabf801ebe98f453fa2d553 --=-vc7kxF/F3x0hT3DRw+wa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mar, 29-01-2013 a las 14:03 +0800, Ben de Groot escribi=C3=B3: > On 29 January 2013 03:30, Pacho Ramos wrote: > > El lun, 28-01-2013 a las 14:37 +0800, Ben de Groot escribi=C3=B3: > >> I've started using this eclass, but with README files, not the variabl= e, > >> because this is currently the only way I can make sure it honours my > >> formatting. > >> > > > > Couldn't it be covered if "echo -e" was used (even with fmt) and you, > > then, control formatting with some of the sequences it allows (they are > > shown in its man page)? >=20 > No. The eclass should assume that DOC_CONTENTS is already correctly > formatted. If you must, you can add a convenience function for people > who do want reformatting, but this should NOT be the default. Please > don't make this eclass harder to use than it needs to be. >=20 I can add a variable (and probably will), but would prefer to keep it formatting messages by default, otherwise, how will you set DOC_CONTENTS variable inside a pkg phase (instead of global scope) without adding tabs to it? You can of course add it, but it will be read as something like: src_prepare() { DOC_CONTENTS=3D"blablabla blablabla" # Rest of src_prepare stuff } Also, autoformatting will help to prevent every package setting messages with different lines length (in some cases really long lines that I finally reported some bugs in the past to get them fitting in "standard" 80 characters per line).=20 I would then switch to "echo -e" and also add a function (like my original solution in this thread) to allow you to disable formatting if you want --=-vc7kxF/F3x0hT3DRw+wa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlEIQ24ACgkQCaWpQKGI+9QAbACdHF4qL4XJi9fCVljtsGMq2JeA cEkAmwX4v2ADohdYuKu5u/7f0rBWQw6Y =A5uf -----END PGP SIGNATURE----- --=-vc7kxF/F3x0hT3DRw+wa--