* [gentoo-dev] sed "" file| cat > file
@ 2001-11-11 20:46 jano
2001-11-11 20:53 ` Aron Griffis
0 siblings, 1 reply; 6+ messages in thread
From: jano @ 2001-11-11 20:46 UTC (permalink / raw
To: gentoo-dev
several ebuilds which use sed break. People are using this method:
sed "//" Makefile | cat > Makefile, whereby they are sed and cat on same
file. I understand this works for some people, but others (e.g. me), it
doesn't, and ends up with a blank Makefile (or other sedded file, e.g. what
happened with abiword).
Quick example ebuilds breaking:
bubblemon, wmfishtime, bbapm, bbkeys, bbppp, bbrun, bbsload, etc etc etc.
I don't understand why this works for some and not for others; is it an
issue of system performance?
jano
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] sed "" file| cat > file
2001-11-11 20:46 [gentoo-dev] sed "" file| cat > file jano
@ 2001-11-11 20:53 ` Aron Griffis
2001-11-12 11:47 ` Holger Brueckner
2002-01-14 10:16 ` Mikael Hallendal
0 siblings, 2 replies; 6+ messages in thread
From: Aron Griffis @ 2001-11-11 20:53 UTC (permalink / raw
To: gentoo-dev
jano wrote: [Sun Nov 11 2001, 09:49:49PM EST]
> I don't understand why this works for some and not for others; is it an
> issue of system performance?
It's a race condition, and it should never be done. Instead, ebuild
authors should use dosed, which is exactly for this purpose.
dosed 's/foo/bar/' Makefile
Aron
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] sed "" file| cat > file
2001-11-11 20:53 ` Aron Griffis
@ 2001-11-12 11:47 ` Holger Brueckner
2002-01-14 10:16 ` Mikael Hallendal
1 sibling, 0 replies; 6+ messages in thread
From: Holger Brueckner @ 2001-11-12 11:47 UTC (permalink / raw
To: gentoo-dev
> It's a race condition, and it should never be done. Instead, ebuild
> authors should use dosed, which is exactly for this purpose.
>
> dosed 's/foo/bar/' Makefile
nice :) but please .. if new functions are invented, please update the
man page, too !!! :) yes i know it's anoying :)
cya
Holger
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] sed "" file| cat > file
2001-11-11 20:53 ` Aron Griffis
2001-11-12 11:47 ` Holger Brueckner
@ 2002-01-14 10:16 ` Mikael Hallendal
2002-01-14 16:09 ` Chris Houser
1 sibling, 1 reply; 6+ messages in thread
From: Mikael Hallendal @ 2002-01-14 10:16 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
mån 2001-11-12 klockan 03.52 skrev Aron Griffis:
> jano wrote: [Sun Nov 11 2001, 09:49:49PM EST]
> > I don't understand why this works for some and not for others; is it an
> > issue of system performance?
>
> It's a race condition, and it should never be done. Instead, ebuild
> authors should use dosed, which is exactly for this purpose.
>
> dosed 's/foo/bar/' Makefile
Is this supposed to work?
It doesn't do anything for me.
Regards,
Mikael Hallendal
--
Mikael Hallendal
Gentoo Linux Developer, Desktop Team Leader
CodeFactory AB, Stockholm, Sweden
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] sed "" file| cat > file
2002-01-14 10:16 ` Mikael Hallendal
@ 2002-01-14 16:09 ` Chris Houser
2002-01-14 17:13 ` Daniel Robbins
0 siblings, 1 reply; 6+ messages in thread
From: Chris Houser @ 2002-01-14 16:09 UTC (permalink / raw
To: gentoo-dev; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]
Mikael Hallendal wrote: [Mon Jan 14 2002, 5:16:02AM EST]
> mån 2001-11-12 klockan 03.52 skrev Aron Griffis:
> > jano wrote: [Sun Nov 11 2001, 09:49:49PM EST]
> > > I don't understand why this works for some and not for others; is it an
> > > issue of system performance?
> >
> > It's a race condition, and it should never be done. Instead, ebuild
> > authors should use dosed, which is exactly for this purpose.
> >
> > dosed 's/foo/bar/' Makefile
>
> Is this supposed to work?
>
> It doesn't do anything for me.
dosed is currently written to only work on files in ${D}, and the sed
script defaults to deleting all occurances of ${D} in the named files.
This makes it ideal for "fixing" paths in text files during the ebuild
'install' phase, but useless for patching sources during the 'unpack'
phase.
Not that you would know this from reading the dosed internal
documentation, since there isn't any. :-/
Anyway, perhaps someone should update dosed or writing something similar
for use during 'unpack'. Until then, what I generally do is:
t=Makefile
cp $t $t.orig
sed 's/foo/bar/' $t.orig > $t
--Chouser
[-- Attachment #2: Type: application/pgp-signature, Size: 519 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] sed "" file| cat > file
2002-01-14 16:09 ` Chris Houser
@ 2002-01-14 17:13 ` Daniel Robbins
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Robbins @ 2002-01-14 17:13 UTC (permalink / raw
To: gentoo-dev
On Mon, 2002-01-14 at 09:09, Chris Houser wrote:
> dosed is currently written to only work on files in ${D}, and the sed
> script defaults to deleting all occurances of ${D} in the named files.
> This makes it ideal for "fixing" paths in text files during the ebuild
> 'install' phase, but useless for patching sources during the 'unpack'
> phase.
>
> Not that you would know this from reading the dosed internal
> documentation, since there isn't any. :-/
>
> Anyway, perhaps someone should update dosed or writing something similar
> for use during 'unpack'. Until then, what I generally do is:
>
> t=Makefile
> cp $t $t.orig
> sed 's/foo/bar/' $t.orig > $t
Dosed is an achim addition, and not to harp on it but the name always
confused me since I was hoping to have a "generic" dosed command for
uses as you described above. Ideally, I'd like to add one in the
future, and then rename dosed so it has a better and more
self-documenting name. Maybe something like "pathstrip".
Best Regards,
--
Daniel Robbins <drobbins@gentoo.org>
Chief Architect/President http://www.gentoo.org
Gentoo Technologies, Inc.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-01-14 16:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-11 20:46 [gentoo-dev] sed "" file| cat > file jano
2001-11-11 20:53 ` Aron Griffis
2001-11-12 11:47 ` Holger Brueckner
2002-01-14 10:16 ` Mikael Hallendal
2002-01-14 16:09 ` Chris Houser
2002-01-14 17:13 ` Daniel Robbins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox