public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] sed vs gsed
@ 2006-01-24 23:14 Diego 'Flameeyes' Pettenò
  2006-01-24 23:32 ` Mike Frysinger
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-01-24 23:14 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

I think the time is mature to ask for another step of Gentoo/ALT 
improvement ;)
Currently ebuilds uses a sed syntax that's mostly GNU sed 4 compatible, but 
incompatible with BSD sed for instance. This is usually fine as we aliases 
sed to gsed in our bashrc so that the problem in sed calls is removed.
The main problem happen with sed when called by xargs or by find, as that 
ignores the aliases set in bashrc.
What I'd like to ask is, if possible, to start using gsed instead, that's 
present on both GNU and other userlands with current stable version of sed 
(4.1.4; ppc-macos has no problem as the 4.0.9 version uses gsed anyway).

It might require to change the dependency over >=sys-apps/sed-4.1.4, but that 
would help making portage a bit cleaner IMHO (instead of relying on sed being 
the executable you need, it make sure you're using a GNU sed version) and 
solves quite a few headaches for us.

Comments about this? (Please don't tell me to do a GLEP about this)

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-24 23:14 [gentoo-dev] sed vs gsed Diego 'Flameeyes' Pettenò
@ 2006-01-24 23:32 ` Mike Frysinger
  2006-01-25  0:13   ` Diego 'Flameeyes' Pettenò
  2006-01-24 23:48 ` Stephen Bennett
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 24+ messages in thread
From: Mike Frysinger @ 2006-01-24 23:32 UTC (permalink / raw
  To: gentoo-dev; +Cc: Diego 'Flameeyes' Pettenò

On Tuesday 24 January 2006 18:14, Diego 'Flameeyes' Pettenò wrote:
> What I'd like to ask is, if possible, to start using gsed instead, that's
> present on both GNU and other userlands with current stable version of sed
> (4.1.4; ppc-macos has no problem as the 4.0.9 version uses gsed anyway).

if you're implying we change all calls from 'sed' to 'gsed' in ebuilds then 
the answer is no from my pov
-mike

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-24 23:14 [gentoo-dev] sed vs gsed Diego 'Flameeyes' Pettenò
  2006-01-24 23:32 ` Mike Frysinger
@ 2006-01-24 23:48 ` Stephen Bennett
  2006-01-25  0:17   ` Diego 'Flameeyes' Pettenò
  2006-01-25  5:16 ` Georgi Georgiev
  2006-01-25 14:31 ` Lisa Seelye
  3 siblings, 1 reply; 24+ messages in thread
From: Stephen Bennett @ 2006-01-24 23:48 UTC (permalink / raw
  To: gentoo-dev

On Wed, 25 Jan 2006 00:14:13 +0100
"Diego 'Flameeyes' Pettenò" <flameeyes@gentoo.org> wrote:

> Comments about this? (Please don't tell me to do a GLEP about this)

We've discussed this several times in the past, and every time the
answer has been that in the ebuild environment `sed` is gnu sed-4. It's
the only sane way to do things, since certain other platforms ship
retarded versions of sed.

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-24 23:32 ` Mike Frysinger
@ 2006-01-25  0:13   ` Diego 'Flameeyes' Pettenò
  2006-01-25  0:29     ` Mike Frysinger
  0 siblings, 1 reply; 24+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-01-25  0:13 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

On Wednesday 25 January 2006 00:32, Mike Frysinger wrote:
> if you're implying we change all calls from 'sed' to 'gsed' in ebuilds then
> the answer is no from my pov
Can you at least read all my mails till the end before replying next time? I 
was referring mainly to the ones that calls sed from find and xargs and 
similar, the rest are a problem that's already worked around and for now is 
fine as they are.

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-24 23:48 ` Stephen Bennett
@ 2006-01-25  0:17   ` Diego 'Flameeyes' Pettenò
  2006-01-25  0:30     ` Mike Frysinger
                       ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-01-25  0:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]

On Wednesday 25 January 2006 00:48, Stephen Bennett wrote:
> We've discussed this several times in the past, and every time the
> answer has been that in the ebuild environment `sed` is gnu sed-4. It's
> the only sane way to do things, since certain other platforms ship
> retarded versions of sed.
And as there's no current way to fix the invokation of sed from within xargs 
or find, I'm not going to ask to change _all_ the calls of sed, but just the 
ones done through those two or other scripts and things that won't honour 
aliases in bashrc.

I have to remember you that the discussions in the past often asked us to redo 
things after a while. Being more strict and safe on the environment (wrt to 
find and xargs) is IMHO helping; there are already things that are more or 
less encapsulated and would be simple to get around (think of patch/gpatch 
that's encapsulated to epatch) if we really need to. But find, xargs and in 
general subshells not honouring bashrc are the main big problem.

Other suggestions are of course welcome, if you have something constructive to 
say about that.

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  0:13   ` Diego 'Flameeyes' Pettenò
@ 2006-01-25  0:29     ` Mike Frysinger
  0 siblings, 0 replies; 24+ messages in thread
From: Mike Frysinger @ 2006-01-25  0:29 UTC (permalink / raw
  To: gentoo-dev; +Cc: Diego 'Flameeyes' Pettenò

On Tuesday 24 January 2006 19:13, Diego 'Flameeyes' Pettenò wrote:
> On Wednesday 25 January 2006 00:32, Mike Frysinger wrote:
> > if you're implying we change all calls from 'sed' to 'gsed' in ebuilds
> > then the answer is no from my pov
>
> Can you at least read all my mails till the end before replying next time?

it wouldnt matter in this case
-mike

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  0:17   ` Diego 'Flameeyes' Pettenò
@ 2006-01-25  0:30     ` Mike Frysinger
  2006-01-25  1:23     ` Ciaran McCreesh
  2006-01-26 10:43     ` Paul de Vrieze
  2 siblings, 0 replies; 24+ messages in thread
From: Mike Frysinger @ 2006-01-25  0:30 UTC (permalink / raw
  To: gentoo-dev; +Cc: Diego 'Flameeyes' Pettenò

On Tuesday 24 January 2006 19:17, Diego 'Flameeyes' Pettenò wrote:
> On Wednesday 25 January 2006 00:48, Stephen Bennett wrote:
> > We've discussed this several times in the past, and every time the
> > answer has been that in the ebuild environment `sed` is gnu sed-4. It's
> > the only sane way to do things, since certain other platforms ship
> > retarded versions of sed.
>
> And as there's no current way to fix the invokation of sed from within
> xargs or find

yes there is

add a 'sed' wrapper to the portage bin dir which simply does:
exec gsed "$@"

> , I'm not going to ask to change _all_ the calls of sed, but 
> just the ones done through those two or other scripts and things that won't
> honour aliases in bashrc.

that's a pita
-mike

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  0:17   ` Diego 'Flameeyes' Pettenò
  2006-01-25  0:30     ` Mike Frysinger
@ 2006-01-25  1:23     ` Ciaran McCreesh
  2006-01-25  8:21       ` Diego 'Flameeyes' Pettenò
  2006-01-26 10:43     ` Paul de Vrieze
  2 siblings, 1 reply; 24+ messages in thread
From: Ciaran McCreesh @ 2006-01-25  1:23 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 661 bytes --]

On Wed, 25 Jan 2006 01:17:23 +0100 "Diego 'Flameeyes' Pettenò"
<flameeyes@gentoo.org> wrote:
| And as there's no current way to fix the invokation of sed from
| within xargs or find, I'm not going to ask to change _all_ the calls
| of sed, but just the ones done through those two or other scripts and
| things that won't honour aliases in bashrc.

If there are any hardcoded calls to /usr/bin/sed, it is reasonable for
you to ask for them to be fixed. For any others, use a wrapper script.

-- 
Ciaran McCreesh : Gentoo Developer (King of all Londinium)
Mail            : ciaranm at gentoo.org
Web             : http://dev.gentoo.org/~ciaranm


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-24 23:14 [gentoo-dev] sed vs gsed Diego 'Flameeyes' Pettenò
  2006-01-24 23:32 ` Mike Frysinger
  2006-01-24 23:48 ` Stephen Bennett
@ 2006-01-25  5:16 ` Georgi Georgiev
  2006-01-25  5:47   ` Mike Frysinger
  2006-01-25 14:31 ` Lisa Seelye
  3 siblings, 1 reply; 24+ messages in thread
From: Georgi Georgiev @ 2006-01-25  5:16 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

maillog: 25/01/2006-00:14:13(+0100): Diego 'Flameeyes' Pettenò types
> What I'd like to ask is, if possible, to start using gsed instead, that's 
> present on both GNU and other userlands with current stable version of sed 
> (4.1.4; ppc-macos has no problem as the 4.0.9 version uses gsed anyway).

Am I stupid or did I miss something?

chutz@lion ~ $ emerge -p sed

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-apps/sed-4.1.4
chutz@lion ~ $ gsed
bash: gsed: command not found

-- 
()   Georgi Georgiev   () Politicians should read science fiction,   ()
()    chutz@gg3.net    () not westerns and detective stories. --     ()
() http://www.gg3.net/ () Arthur C. Clarke                           ()

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  5:16 ` Georgi Georgiev
@ 2006-01-25  5:47   ` Mike Frysinger
  2006-01-25  8:19     ` Diego 'Flameeyes' Pettenò
  0 siblings, 1 reply; 24+ messages in thread
From: Mike Frysinger @ 2006-01-25  5:47 UTC (permalink / raw
  To: gentoo-dev

On Wednesday 25 January 2006 00:16, Georgi Georgiev wrote:
> maillog: 25/01/2006-00:14:13(+0100): Diego 'Flameeyes' Pettenò types
>
> > What I'd like to ask is, if possible, to start using gsed instead, that's
> > present on both GNU and other userlands with current stable version of
> > sed (4.1.4; ppc-macos has no problem as the 4.0.9 version uses gsed
> > anyway).
>
> Am I stupid or did I miss something?

well, i cant really verify you arent stupid, but ...

> [ebuild   R   ] sys-apps/sed-4.1.4
> chutz@lion ~ $ gsed
> bash: gsed: command not found

Diego was mistaken here ... probably my fault because i lied to him at some 
point on irc, who knows for sure ... at any rate, the sed ebuild does not 
install 'gsed' on GNU systems
-mike

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  5:47   ` Mike Frysinger
@ 2006-01-25  8:19     ` Diego 'Flameeyes' Pettenò
  2006-01-25  8:54       ` Grobian
  0 siblings, 1 reply; 24+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-01-25  8:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

On Wednesday 25 January 2006 06:47, Mike Frysinger wrote:
> Diego was mistaken here ... probably my fault because i lied to him at some
> point on irc, who knows for sure ... at any rate, the sed ebuild does not
> install 'gsed' on GNU systems
I was pretty sure we decided to go with g-prefixed for tar, sed and make for 
GNU systems, too (and it's what it's being done by gawk, gmake and so on).
I actually have gsed locally, but it might be some trace from the old g/fbsd 
overlay at this point...

So this makes the things more complex again. Time to rethink all of that, what 
you think?

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  1:23     ` Ciaran McCreesh
@ 2006-01-25  8:21       ` Diego 'Flameeyes' Pettenò
  2006-01-25 13:26         ` Mike Frysinger
  0 siblings, 1 reply; 24+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-01-25  8:21 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

On Wednesday 25 January 2006 02:23, Ciaran McCreesh wrote:
> If there are any hardcoded calls to /usr/bin/sed, it is reasonable for
> you to ask for them to be fixed. For any others, use a wrapper script.
I think the wrapper script idea was turned down by someone from portage IIRC.
Anyway it's not exactly the cleanest solution: while it would have an 
immediate effect with no work required, it will increas, and not decrease) 
the number of "assumption" portage does. I think this is one of the worse 
things that can be done at this point.

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  8:19     ` Diego 'Flameeyes' Pettenò
@ 2006-01-25  8:54       ` Grobian
  2006-01-25  9:22         ` Diego 'Flameeyes' Pettenò
  0 siblings, 1 reply; 24+ messages in thread
From: Grobian @ 2006-01-25  8:54 UTC (permalink / raw
  To: gentoo-dev

On 25-01-2006 09:19:44 +0100, Diego 'Flameeyes' Pettenò wrote:
> On Wednesday 25 January 2006 06:47, Mike Frysinger wrote:
> > Diego was mistaken here ... probably my fault because i lied to him at some
> > point on irc, who knows for sure ... at any rate, the sed ebuild does not
> > install 'gsed' on GNU systems
> I was pretty sure we decided to go with g-prefixed for tar, sed and make for 
> GNU systems, too (and it's what it's being done by gawk, gmake and so on).
> I actually have gsed locally, but it might be some trace from the old g/fbsd 
> overlay at this point...
> 
> So this makes the things more complex again. Time to rethink all of
> that, what you think?

I think that the g-prefixed installs are a big pain, unless you can
interface to them, like epatch does.  However, you can't because the
exec call of a process doesn't use a shell.  It appears that some people
don't agree with you on changing the assumptions made in the current
portage tree.
Solution to this is making the GNU tool the default for portage known
under its non-g-prefixed name, such that the assumptions made in the
tree hold.

Maybe it's just the path of least resistance...  The profit of having a
tree that works with any implementation of awk, sed, find, xargs, etc.
is perhaps too small for the actual work and sacrifices needed for it.


-- 
Fabian Groffen
Gentoo for Mac OS X Project
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  8:54       ` Grobian
@ 2006-01-25  9:22         ` Diego 'Flameeyes' Pettenò
  2006-01-26 10:47           ` Paul de Vrieze
  0 siblings, 1 reply; 24+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-01-25  9:22 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1655 bytes --]

On Wednesday 25 January 2006 09:54, Grobian wrote:
> It appears that some people 
> don't agree with you on changing the assumptions made in the current
> portage tree.
I'm not going to ask for dropping the assumption, I'm just asking for making 
sure that the assumption is actually backed up with actual presence. The 
sed/gsed naming shouldn't be too hard to achieve and it's already common in 
non-GNU userlands. As we seen for gmake/gawk, it's also a common way to make 
sure for some scripts to use a GNU tool.

> Solution to this is making the GNU tool the default for portage known
> under its non-g-prefixed name, such that the assumptions made in the
> tree hold.
This requires (ab)using /usr/lib/portage/bin .. last time you were against 
that, weren't you?

> Maybe it's just the path of least resistance...  The profit of having a
> tree that works with any implementation of awk, sed, find, xargs, etc.
> is perhaps too small for the actual work and sacrifices needed for it.
About find, the problem is really minimum: with last release GNU find make 
simpler to deal with it as it has a stricter syntax.
The rest, I never asked for people to rewrite all the awk and sed scripts to 
work with BSDish awk and sed, I'm just asking to make sure that the GNU 
versions are called, no matter what, by using gawk and gsed naming. I'm not 
even asking for them to be fixed for all ebuilds, but only for the ones that 
uses subshell not respecting aliases....
Not that difficult, is it?

-- 
Diego "Flameeyes" Pettenò - http://dev.gentoo.org/~flameeyes/
Gentoo/ALT lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  8:21       ` Diego 'Flameeyes' Pettenò
@ 2006-01-25 13:26         ` Mike Frysinger
  0 siblings, 0 replies; 24+ messages in thread
From: Mike Frysinger @ 2006-01-25 13:26 UTC (permalink / raw
  To: gentoo-dev

On Wednesday 25 January 2006 03:21, Diego 'Flameeyes' Pettenò wrote:
> On Wednesday 25 January 2006 02:23, Ciaran McCreesh wrote:
> > If there are any hardcoded calls to /usr/bin/sed, it is reasonable for
> > you to ask for them to be fixed. For any others, use a wrapper script.
>
> I think the wrapper script idea was turned down by someone from portage
> IIRC. Anyway it's not exactly the cleanest solution: while it would have an
> immediate effect with no work required, it will increas, and not decrease)
> the number of "assumption" portage does. I think this is one of the worse
> things that can be done at this point.

what kind of "assumptions" ?  the kind where we, as ebuild writers, assume the 
system tools have a lot of features ?

assuming `sed` in Gentoo is a GNU/sed is just fine by me
-mike

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-24 23:14 [gentoo-dev] sed vs gsed Diego 'Flameeyes' Pettenò
                   ` (2 preceding siblings ...)
  2006-01-25  5:16 ` Georgi Georgiev
@ 2006-01-25 14:31 ` Lisa Seelye
  3 siblings, 0 replies; 24+ messages in thread
From: Lisa Seelye @ 2006-01-25 14:31 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1375 bytes --]

On Wed, 2006-01-25 at 00:14 +0100, Diego 'Flameeyes' Pettenò wrote:
> I think the time is mature to ask for another step of Gentoo/ALT 
> improvement ;)
> Currently ebuilds uses a sed syntax that's mostly GNU sed 4 compatible, but 
> incompatible with BSD sed for instance. This is usually fine as we aliases 
> sed to gsed in our bashrc so that the problem in sed calls is removed.
> The main problem happen with sed when called by xargs or by find, as that 
> ignores the aliases set in bashrc.
> What I'd like to ask is, if possible, to start using gsed instead, that's 
> present on both GNU and other userlands with current stable version of sed 
> (4.1.4; ppc-macos has no problem as the 4.0.9 version uses gsed anyway).
> 
> It might require to change the dependency over >=sys-apps/sed-4.1.4, but that 
> would help making portage a bit cleaner IMHO (instead of relying on sed being 
> the executable you need, it make sure you're using a GNU sed version) and 
> solves quite a few headaches for us.
> 
> Comments about this? (Please don't tell me to do a GLEP about this)

Can you change the PATH that Portage uses to do ebuilds to favour,
say, /usr/local/gentoo-bsd/wrappers/bin, first which will have a sed to
gsed wrapper?

-- 
Regards,
Lisa Seelye
GPG: 09CF5 2D6B8 2B72B 997A7 601BC B46B5 561E4 96FC5
http://www.thedoh.com/~lisa/site

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  0:17   ` Diego 'Flameeyes' Pettenò
  2006-01-25  0:30     ` Mike Frysinger
  2006-01-25  1:23     ` Ciaran McCreesh
@ 2006-01-26 10:43     ` Paul de Vrieze
  2006-01-26 13:51       ` Mike Frysinger
  2 siblings, 1 reply; 24+ messages in thread
From: Paul de Vrieze @ 2006-01-26 10:43 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

On Wednesday 25 January 2006 01:17, Diego 'Flameeyes' Pettenò wrote:
> On Wednesday 25 January 2006 00:48, Stephen Bennett wrote:
> > We've discussed this several times in the past, and every time the
> > answer has been that in the ebuild environment `sed` is gnu sed-4. It's
> > the only sane way to do things, since certain other platforms ship
> > retarded versions of sed.
>
> And as there's no current way to fix the invokation of sed from within
> xargs or find, I'm not going to ask to change _all_ the calls of sed, but
> just the ones done through those two or other scripts and things that won't
> honour aliases in bashrc.

Make a sed link / copy / script / whatever in an alternative location, and put 
it in the portage path before /bin. That should solve all these kinds of 
problems. In general it might make sense to have such a directory for 
portage. Another candidate would be the strip binary which might be called by 
certain makefiles instead of being portage controlled.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-25  9:22         ` Diego 'Flameeyes' Pettenò
@ 2006-01-26 10:47           ` Paul de Vrieze
  0 siblings, 0 replies; 24+ messages in thread
From: Paul de Vrieze @ 2006-01-26 10:47 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

On Wednesday 25 January 2006 10:22, Diego 'Flameeyes' Pettenò wrote:
> On Wednesday 25 January 2006 09:54, Grobian wrote:
> > It appears that some people
> > don't agree with you on changing the assumptions made in the current
> > portage tree.
>
> I'm not going to ask for dropping the assumption, I'm just asking for
> making sure that the assumption is actually backed up with actual presence.
> The sed/gsed naming shouldn't be too hard to achieve and it's already
> common in non-GNU userlands. As we seen for gmake/gawk, it's also a common
> way to make sure for some scripts to use a GNU tool.
>
> > Solution to this is making the GNU tool the default for portage known
> > under its non-g-prefixed name, such that the assumptions made in the
> > tree hold.
>
> This requires (ab)using /usr/lib/portage/bin .. last time you were against
> that, weren't you?

What about a separate directory which is arch specific. Or have it installed 
by an arch package, not by portage itself. Obviously a sed wrapper is not 
needed for gnu systems, but is for bsd based ones. etc.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-26 10:43     ` Paul de Vrieze
@ 2006-01-26 13:51       ` Mike Frysinger
  2006-01-26 16:06         ` Paul de Vrieze
  0 siblings, 1 reply; 24+ messages in thread
From: Mike Frysinger @ 2006-01-26 13:51 UTC (permalink / raw
  To: gentoo-dev

On Thursday 26 January 2006 05:43, Paul de Vrieze wrote:
> Another candidate would be the strip binary which might be called
> by certain makefiles instead of being portage controlled.

packages should never strip, only portage should
-mike
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-26 13:51       ` Mike Frysinger
@ 2006-01-26 16:06         ` Paul de Vrieze
  2006-01-26 18:53           ` Mike Frysinger
  0 siblings, 1 reply; 24+ messages in thread
From: Paul de Vrieze @ 2006-01-26 16:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

On Thursday 26 January 2006 14:51, Mike Frysinger wrote:
> On Thursday 26 January 2006 05:43, Paul de Vrieze wrote:
> > Another candidate would be the strip binary which might be called
> > by certain makefiles instead of being portage controlled.
>
> packages should never strip, only portage should

ebuilds don't, some makefiles do. Sometimes when calling the strip option of 
install. A strip wrapper prevents this broken behaviour once and for all. It 
could even be written to show a big fat warning.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-26 16:06         ` Paul de Vrieze
@ 2006-01-26 18:53           ` Mike Frysinger
  2006-01-27  8:17             ` Paul de Vrieze
  0 siblings, 1 reply; 24+ messages in thread
From: Mike Frysinger @ 2006-01-26 18:53 UTC (permalink / raw
  To: gentoo-dev

On Thursday 26 January 2006 11:06, Paul de Vrieze wrote:
> On Thursday 26 January 2006 14:51, Mike Frysinger wrote:
> > On Thursday 26 January 2006 05:43, Paul de Vrieze wrote:
> > > Another candidate would be the strip binary which might be called
> > > by certain makefiles instead of being portage controlled.
> >
> > packages should never strip, only portage should
>
> ebuilds don't, some makefiles do.

exactly, thus i said "packages" and not "ebuilds"

> Sometimes when calling the strip option 
> of install. A strip wrapper prevents this broken behaviour once and for
> all. It could even be written to show a big fat warning.

i know ... it isnt uncommon to see like `install -s` or `$(STRIP)` in packages 
and those need to be removed

while this is a neat idea (catching those people who do `install -s`), i'm not 
sure it'd work as there isnt a clean way to detect whether it's the package 
calling `strip` or the ebuild/portage ... you could try passing info via an 
env var, but that's no fun :)
-mike
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-26 18:53           ` Mike Frysinger
@ 2006-01-27  8:17             ` Paul de Vrieze
  2006-01-27 13:42               ` Mike Frysinger
  0 siblings, 1 reply; 24+ messages in thread
From: Paul de Vrieze @ 2006-01-27  8:17 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

On Thursday 26 January 2006 19:53, Mike Frysinger wrote:
> On Thursday 26 January 2006 11:06, Paul de Vrieze wrote:
> > On Thursday 26 January 2006 14:51, Mike Frysinger wrote:
> > > On Thursday 26 January 2006 05:43, Paul de Vrieze wrote:
> > > > Another candidate would be the strip binary which might be called
> > > > by certain makefiles instead of being portage controlled.
> > >
> > > packages should never strip, only portage should
> >
> > ebuilds don't, some makefiles do.
>
> exactly, thus i said "packages" and not "ebuilds"

Btw. I do agree with you that they shouldn't.

>
> > Sometimes when calling the strip option
> > of install. A strip wrapper prevents this broken behaviour once and for
> > all. It could even be written to show a big fat warning.
>
> i know ... it isnt uncommon to see like `install -s` or `$(STRIP)` in
> packages and those need to be removed
>
> while this is a neat idea (catching those people who do `install -s`), i'm
> not sure it'd work as there isnt a clean way to detect whether it's the
> package calling `strip` or the ebuild/portage ... you could try passing
> info via an env var, but that's no fun :)

Well, portage uses prepstrip to do stripping. As such this prepstrip script 
could take care not to use the wrong strip binary. Shouldn't be hard to do 
even without hardcoding the path to the strip binary.

For ebuilds calling strip, I see no reason why they would. If at some point it 
is found necessary, it would be easy to have an estrip command to do this.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-27  8:17             ` Paul de Vrieze
@ 2006-01-27 13:42               ` Mike Frysinger
  2006-01-27 14:36                 ` Paul de Vrieze
  0 siblings, 1 reply; 24+ messages in thread
From: Mike Frysinger @ 2006-01-27 13:42 UTC (permalink / raw
  To: gentoo-dev

On Friday 27 January 2006 03:17, Paul de Vrieze wrote:
> On Thursday 26 January 2006 19:53, Mike Frysinger wrote:
> > On Thursday 26 January 2006 11:06, Paul de Vrieze wrote:
> > > Sometimes when calling the strip option
> > > of install. A strip wrapper prevents this broken behaviour once and for
> > > all. It could even be written to show a big fat warning.
> >
> > i know ... it isnt uncommon to see like `install -s` or `$(STRIP)` in
> > packages and those need to be removed
> >
> > while this is a neat idea (catching those people who do `install -s`),
> > i'm not sure it'd work as there isnt a clean way to detect whether it's
> > the package calling `strip` or the ebuild/portage ... you could try
> > passing info via an env var, but that's no fun :)
>
> Well, portage uses prepstrip to do stripping. As such this prepstrip script
> could take care not to use the wrong strip binary. Shouldn't be hard to do
> even without hardcoding the path to the strip binary.

it does ... but in case it cant find a fully qualified strip binary 
(CHOST-strip), it will fall back to plain old `strip`

> For ebuilds calling strip, I see no reason why they would. If at some point
> it is found necessary, it would be easy to have an estrip command to do
> this.

even ebuilds shouldnt be calling strip

they can call `prepstrip <files or dirs>`
-mike
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [gentoo-dev] sed vs gsed
  2006-01-27 13:42               ` Mike Frysinger
@ 2006-01-27 14:36                 ` Paul de Vrieze
  0 siblings, 0 replies; 24+ messages in thread
From: Paul de Vrieze @ 2006-01-27 14:36 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

On Friday 27 January 2006 14:42, Mike Frysinger wrote:
>
> it does ... but in case it cant find a fully qualified strip binary
> (CHOST-strip), it will fall back to plain old `strip`

Which it certainly can. As long as it doesn't look in /usr/lib/portage/bin to 
find it. Something like:

STRIP="`which -a strip|grep -v "/usr/lib/portage/bin"|head -n 1`"

>
> > For ebuilds calling strip, I see no reason why they would. If at some
> > point it is found necessary, it would be easy to have an estrip command
> > to do this.
>
> even ebuilds shouldnt be calling strip

So we don't need to make such an estrip command. Even better.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: pauldv@gentoo.org
Homepage: http://www.devrieze.net

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-01-27 14:42 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-24 23:14 [gentoo-dev] sed vs gsed Diego 'Flameeyes' Pettenò
2006-01-24 23:32 ` Mike Frysinger
2006-01-25  0:13   ` Diego 'Flameeyes' Pettenò
2006-01-25  0:29     ` Mike Frysinger
2006-01-24 23:48 ` Stephen Bennett
2006-01-25  0:17   ` Diego 'Flameeyes' Pettenò
2006-01-25  0:30     ` Mike Frysinger
2006-01-25  1:23     ` Ciaran McCreesh
2006-01-25  8:21       ` Diego 'Flameeyes' Pettenò
2006-01-25 13:26         ` Mike Frysinger
2006-01-26 10:43     ` Paul de Vrieze
2006-01-26 13:51       ` Mike Frysinger
2006-01-26 16:06         ` Paul de Vrieze
2006-01-26 18:53           ` Mike Frysinger
2006-01-27  8:17             ` Paul de Vrieze
2006-01-27 13:42               ` Mike Frysinger
2006-01-27 14:36                 ` Paul de Vrieze
2006-01-25  5:16 ` Georgi Georgiev
2006-01-25  5:47   ` Mike Frysinger
2006-01-25  8:19     ` Diego 'Flameeyes' Pettenò
2006-01-25  8:54       ` Grobian
2006-01-25  9:22         ` Diego 'Flameeyes' Pettenò
2006-01-26 10:47           ` Paul de Vrieze
2006-01-25 14:31 ` Lisa Seelye

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox