From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27661 invoked from network); 13 Nov 2004 16:25:13 +0000 Received: from smtp.gentoo.org (156.56.111.197) by lists.gentoo.org with AES256-SHA encrypted SMTP; 13 Nov 2004 16:25:13 +0000 Received: from lists.gentoo.org ([156.56.111.196] helo=parrot.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.41) id 1CT0i8-0006ac-Vp for arch-gentoo-dev@lists.gentoo.org; Sat, 13 Nov 2004 16:25:12 +0000 Received: (qmail 3497 invoked by uid 89); 13 Nov 2004 16:25:12 +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 20804 invoked from network); 13 Nov 2004 16:25:11 +0000 Date: Sat, 13 Nov 2004 08:58:03 -0500 X-OfflineIMAP-2022738732-70696d656e7473656e64-494e424f582e4f7574626f78: 1100363107-0295142403534-v4.0.7 From: Aron Griffis To: gentoo-dev@lists.gentoo.org Message-ID: <20041113135803.GD3458@time.flatmonk.org> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20041111234522.40d8f48d@snowdrop.home> <419451F6.1010202@gentoo.org> <20041112070757.GA21178@tiger.gg3.net> <1100225464.8750.2.camel@localhost> <4194A18E.30106@gentoo.org> <20041112153025.GB452@time.flatmonk.org> <1100326117.27444.22.camel@camus.fmakunbound.com> <1100300845.8729.17.camel@localhost> <1100346289.27444.60.camel@camus.fmakunbound.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BI5RvnYi6R4T2M87" Content-Disposition: inline In-Reply-To: <1100346289.27444.60.camel@camus.fmakunbound.com> User-Agent: Mutt/1.5.6i Subject: Re: [gentoo-dev] einfo / ewarn banners and die messages X-Archives-Salt: da35e8f3-a11a-4cb0-81a4-8753e607586a X-Archives-Hash: 14bb50bc66eadd40838849e6d75cefb7 --BI5RvnYi6R4T2M87 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Matthew Kenendy wrote: [Sat Nov 13 2004, 06:44:49AM EST] > Up until this thread, the solution was simple: >=20 > doins *.fasl *.dat Simple but sloppy and error-prone. What if the *.fasl files are missing? You won't know about it until the somebody reports a bug. Ideally we want to be catching errors before the users, and it would be easier if the ebuilds didn't allow this kind of sloppiness. > So what will that need to be if doins calls die because a file '*.dat' > can't be found? Good question. Neither of the following works, but we want something short: [[ -e *.dat ]] # *.dat doesn't expand (semantics of [[ ]]) [ -e *.dat ] # *.dat expands and causes an error How about this? doins *.fasl exists *.dat && doins *.dat In ebuild.sh: exists() { [[ -e $1 ]] } This works because the glob is expanded before calling exists(), which then only needs to test the first argument to make a determination. If the argument is a file expanded from the glob, goodness. If the file is the glob itself, it won't be found. > Perhaps doins should take a --strict argument, whose absence will be > compatible with what I do now and whose presence will be appreciated by > those developers forgetting to install init.d run scripts etc. Same as telling devs to append ||die as we've been saying all along. Isn't it better to optimize for the common case by dying when files are missing? Regards, Aron -- Aron Griffis Gentoo Linux Developer --BI5RvnYi6R4T2M87 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.9.10 (GNU/Linux) iD8DBQFBlhLrJrHF4yAQTrARAjrdAKCdyPekUisjbltE5orMFQc+s0+P3gCdFhg2 sSOJrkzyOKO/E5g46S+dviM= =lbt/ -----END PGP SIGNATURE----- --BI5RvnYi6R4T2M87--