From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.3/8.13.3) with ESMTP id j2TICmOx018263 for ; Tue, 29 Mar 2005 18:12:48 GMT Received: from ppsw-5.csi.cam.ac.uk ([131.111.8.135]) by smtp.gentoo.org with esmtp (Exim 4.43) id 1DGLCp-0000gq-BF for gentoo-dev@robin.gentoo.org; Tue, 29 Mar 2005 18:12:47 +0000 Received: from cpc1-cmbg1-5-0-cust159.cmbg.cable.ntl.com ([62.253.134.159]:61460 helo=maya) by ppsw-5.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.155]:465) with esmtpsa (PLAIN:spb42) (SSLv3:RC4-MD5:128) id 1DGLCh-0003Lp-Gh (Exim 4.44) for gentoo-dev@gentoo.org (return-path ); Tue, 29 Mar 2005 19:12:39 +0100 Subject: Re: [gentoo-dev] perl, sed and non-gsed From: Stephen Bennett To: gentoo-dev@robin.gentoo.org In-Reply-To: <200503291724.01161@enterprise.flameeyes.is-a-geek.org> References: <200503281806.17832@enterprise.flameeyes.is-a-geek.org> <20050328183158.06243152@snowdrop> <4248E07E.9040400@gentoo.org> <200503291724.01161@enterprise.flameeyes.is-a-geek.org> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 29 Mar 2005 18:16:43 +0000 Message-Id: <1112120203.23361.12.camel@localhost> Precedence: bulk List-Post: , , List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-To: gentoo-dev@gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Sender: spb42@hermes.cam.ac.uk X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by robin.gentoo.org id j2TICmOx018263 X-Archives-Salt: fa44a7f6-9303-4d21-9ba3-2fa84ccceb5b X-Archives-Hash: fad8905c055eae334b3f621ff718b397 On Tue, 2005-03-29 at 17:23 +0200, Diego "Flameeyes" Pettenò wrote: > On Tuesday 29 March 2005 06:58, Aaron Walker wrote: > > FYI Ciaran and Diego, sed is aliased to gsed on BSD. > I know, but this is, imho, an ugly workaround :) It's an ugly workaround, and one that i'd like to remove if possible. Right now that's a fairly big 'if', but one possible way to do it suggests itself: - Modify the sed ebuild to install a gsed -> sed symlink on GNU systems. - Fix sed usages in the tree where that's practical / easy (such as -i / -e argument ordering). Otherwise, explicitly call gsed if we need GNU extensions that aren't present in BSD / others. - Remove the alias in non-gnu systems' profile.bashrcs. As ciaranm said earlier, GNU sed does have a lot of useful extensions; however BSD sed (for example) supports most of them, and I can't help but feel it'd be nice to be able to use a platform's native sed wherever possible. The above scheme is just what seems like the obvious solution that shouldn't affect GNU systems too much, but lets us use native apps where possible. Where those native apps suck too much then those profiles can just keep the gsed alias. At the moment, this is just a random thought that occurred and got written down, so don't be surprised if I've overlooked something. Any comments? Suggestions, flames? (Except from ciaranm, of course...) -- gentoo-dev@gentoo.org mailing list