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 73E77138773 for ; Wed, 30 Jan 2013 18:43:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3DECB21C068; Wed, 30 Jan 2013 18:43:22 +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 2A72821C00B for ; Wed, 30 Jan 2013 18:43:21 +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 B684533DC01 for ; Wed, 30 Jan 2013 18:43:19 +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> <1359496046.2927.55.camel@belkin4> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-p7BB470ydHxqRBWgpEHX" Date: Wed, 30 Jan 2013 19:43:14 +0100 Message-ID: <1359571394.26423.4.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: bb5ce75c-f577-4ee7-bc46-e35141165ccc X-Archives-Hash: 6edf2e309eed47f535b840524adedbcf --=-p7BB470ydHxqRBWgpEHX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mi=C3=A9, 30-01-2013 a las 21:24 +0800, Ben de Groot escribi=C3=B3: > On 30 January 2013 05:47, Pacho Ramos wrote: > > 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 vari= able, > >> >> because this is currently the only way I can make sure it honours m= y > >> >> 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)? > >> > >> 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. > >> > > > > I can add a variable (and probably will), but would prefer to keep it > > formatting messages by default, otherwise, how will you set DOC_CONTENT= S > > 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 > > } >=20 > I still prefer the eclass not to mess with formatting by default. You > can do what you want by >=20 > src_prepare() { > DOC_CONTENTS=3D"blabla > indented content" > # other stuff > } But it will be recorded with indent in README.gentoo, what is not desired. >=20 > src_install() { > default > readme.gentoo_reformat > } >=20 > > Also, autoformatting will help to prevent every package setting message= s > > 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 > Sometimes long lines are what is required. If not, then filing a bug > is the friendly solution. >=20 In that case, you could set the variable to skip formatting as, the preferred option is to keep them in standard length, and the exception is to require longer lines (in that case they could be covered with the variable)=20 --=-p7BB470ydHxqRBWgpEHX 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) iEYEABECAAYFAlEJacIACgkQCaWpQKGI+9QXYQCeODIiBNXYtPZQD5NXVzx8OniK VwsAninjG247U/zUCS85zBOvk+bWls38 =M1wh -----END PGP SIGNATURE----- --=-p7BB470ydHxqRBWgpEHX--