public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
       [not found] <E1IZuAp-0003SW-W2@stork.gentoo.org>
@ 2007-09-25  0:33 ` Donnie Berkholz
  2007-09-25  9:10   ` Robert Buchholz
  2007-09-25 14:16   ` [gentoo-dev] " Doug Goldstein
  0 siblings, 2 replies; 9+ messages in thread
From: Donnie Berkholz @ 2007-09-25  0:33 UTC (permalink / raw
  To: gentoo-dev; +Cc: cardoe

On 20:04 Mon 24 Sep     , Doug Goldstein (cardoe) wrote:
> cardoe      07/09/24 20:04:55
> 
>   Modified:             ChangeLog
>   Added:                linuxtv-dvb-apps-1.1.1.20070924.ebuild
>   Log:
>   latest upstream snapshot. Includes many scan file updates. Drops duplicate installs of scan files in /usr/share/dvb.
>   (Portage version: 2.1.3.9)

> 1.1                  media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20070924.ebuild
> 
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20070924.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20070924.ebuild?rev=1.1&content-type=text/plain

Numerous instances of D, S, T without quotes.

> 	if ! use usb; then
> 		sed -i util/Makefile \
> 			-e '/ttusb_dec_reset/d' \
> 			-e '/dib3000-watch/d'
> 	fi
> 
> 	# do not compile test-progs
> 	sed -i Makefile -e '/-C test/d'

You might want to die if these seds fail.

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25  0:33 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild Donnie Berkholz
@ 2007-09-25  9:10   ` Robert Buchholz
  2007-09-25 14:45     ` Mike Frysinger
                       ` (2 more replies)
  2007-09-25 14:16   ` [gentoo-dev] " Doug Goldstein
  1 sibling, 3 replies; 9+ messages in thread
From: Robert Buchholz @ 2007-09-25  9:10 UTC (permalink / raw
  To: gentoo-dev; +Cc: Donnie Berkholz, cardoe

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

On Tuesday, 25. September 2007, Donnie Berkholz wrote:
> On 20:04 Mon 24 Sep     , Doug Goldstein (cardoe) wrote:
> > 	if ! use usb; then
> > 		sed -i util/Makefile \
> > 			-e '/ttusb_dec_reset/d' \
> > 			-e '/dib3000-watch/d'
> > 	fi
> >
> > 	# do not compile test-progs
> > 	sed -i Makefile -e '/-C test/d'
>
> You might want to die if these seds fail.

I already wondered a while back:
sed only fails if the file does not exist, but not if there was no 
replacement. Is there any way to force it to?

Regards,
Robert

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

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

* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in  media-tv/linuxtv-dvb-apps: ChangeLog  linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25  0:33 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild Donnie Berkholz
  2007-09-25  9:10   ` Robert Buchholz
@ 2007-09-25 14:16   ` Doug Goldstein
  2007-09-26  1:19     ` Donnie Berkholz
  1 sibling, 1 reply; 9+ messages in thread
From: Doug Goldstein @ 2007-09-25 14:16 UTC (permalink / raw
  To: Donnie Berkholz; +Cc: gentoo-dev

Donnie Berkholz wrote:
> On 20:04 Mon 24 Sep     , Doug Goldstein (cardoe) wrote:
>   
>> cardoe      07/09/24 20:04:55
>>
>>   Modified:             ChangeLog
>>   Added:                linuxtv-dvb-apps-1.1.1.20070924.ebuild
>>   Log:
>>   latest upstream snapshot. Includes many scan file updates. Drops duplicate installs of scan files in /usr/share/dvb.
>>   (Portage version: 2.1.3.9)
>>     
>
>   
>> 1.1                  media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20070924.ebuild
>>
>> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20070924.ebuild?rev=1.1&view=markup
>> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/linuxtv-dvb-apps/linuxtv-dvb-apps-1.1.1.20070924.ebuild?rev=1.1&content-type=text/plain
>>     
>
> Numerous instances of D, S, T without quotes.
>
>   
>> 	if ! use usb; then
>> 		sed -i util/Makefile \
>> 			-e '/ttusb_dec_reset/d' \
>> 			-e '/dib3000-watch/d'
>> 	fi
>>
>> 	# do not compile test-progs
>> 	sed -i Makefile -e '/-C test/d'
>>     
>
> You might want to die if these seds fail.
>
> Thanks,
> Donnie
>   
I simply cp'd the previous revision to the new revision so it would pull
now a newer upstream tarball then one from middle January. File a bug
with the maintainers.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25  9:10   ` Robert Buchholz
@ 2007-09-25 14:45     ` Mike Frysinger
  2007-09-25 23:02     ` Stephen Bennett
  2007-09-26  9:38     ` [gentoo-dev] " Steve Long
  2 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2007-09-25 14:45 UTC (permalink / raw
  To: gentoo-dev; +Cc: Robert Buchholz, Donnie Berkholz, cardoe

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

On Tuesday 25 September 2007, Robert Buchholz wrote:
> On Tuesday, 25. September 2007, Donnie Berkholz wrote:
> > On 20:04 Mon 24 Sep     , Doug Goldstein (cardoe) wrote:
> > > 	if ! use usb; then
> > > 		sed -i util/Makefile \
> > > 			-e '/ttusb_dec_reset/d' \
> > > 			-e '/dib3000-watch/d'
> > > 	fi
> > >
> > > 	# do not compile test-progs
> > > 	sed -i Makefile -e '/-C test/d'
> >
> > You might want to die if these seds fail.
>
> I already wondered a while back:
> sed only fails if the file does not exist, but not if there was no
> replacement. Is there any way to force it to?

i'm fairly certain the answer is no
-mike

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

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

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25  9:10   ` Robert Buchholz
  2007-09-25 14:45     ` Mike Frysinger
@ 2007-09-25 23:02     ` Stephen Bennett
  2007-09-26  5:44       ` Donnie Berkholz
  2007-09-26  9:38     ` [gentoo-dev] " Steve Long
  2 siblings, 1 reply; 9+ messages in thread
From: Stephen Bennett @ 2007-09-25 23:02 UTC (permalink / raw
  To: gentoo-dev

On Tue, 25 Sep 2007 11:10:34 +0200
Robert Buchholz <rbu@gentoo.org> wrote:

> I already wondered a while back:
> sed only fails if the file does not exist, but not if there was no 
> replacement. Is there any way to force it to?

Off the top of my head...

sed -e '1{x;s/^/0/;x;ta;:a}'
-e 's/$STRING/$REPLACEMENT/'
-e 'Tb;x;s/^/1/;x;:b;${p;x;/^0/Q1;Q0};'
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25 14:16   ` [gentoo-dev] " Doug Goldstein
@ 2007-09-26  1:19     ` Donnie Berkholz
  0 siblings, 0 replies; 9+ messages in thread
From: Donnie Berkholz @ 2007-09-26  1:19 UTC (permalink / raw
  To: gentoo-dev; +Cc: cardoe

On 10:16 Tue 25 Sep     , Doug Goldstein wrote:
> Donnie Berkholz wrote:
> > On 20:04 Mon 24 Sep     , Doug Goldstein (cardoe) wrote:
> >   
> >> cardoe      07/09/24 20:04:55
> >>
> >>   Modified:             ChangeLog
> >>   Added:                linuxtv-dvb-apps-1.1.1.20070924.ebuild
> >>   Log:
> >>   latest upstream snapshot. Includes many scan file updates. Drops duplicate installs of scan files in /usr/share/dvb.
> >>   (Portage version: 2.1.3.9)

> I simply cp'd the previous revision to the new revision so it would pull
> now a newer upstream tarball then one from middle January. File a bug
> with the maintainers.

I feel a responsibility to commit the best, most bug-free code I can, 
regardless of whether I created the bug. Don't you?

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25 23:02     ` Stephen Bennett
@ 2007-09-26  5:44       ` Donnie Berkholz
  2007-09-26  6:15         ` Mike Frysinger
  0 siblings, 1 reply; 9+ messages in thread
From: Donnie Berkholz @ 2007-09-26  5:44 UTC (permalink / raw
  To: gentoo-dev

On 00:02 Wed 26 Sep     , Stephen Bennett wrote:
> On Tue, 25 Sep 2007 11:10:34 +0200
> Robert Buchholz <rbu@gentoo.org> wrote:
> 
> > I already wondered a while back:
> > sed only fails if the file does not exist, but not if there was no 
> > replacement. Is there any way to force it to?
> 
> Off the top of my head...
> 
> sed -e '1{x;s/^/0/;x;ta;:a}'
> -e 's/$STRING/$REPLACEMENT/'
> -e 'Tb;x;s/^/1/;x;:b;${p;x;/^0/Q1;Q0};'

I spent a few minutes trying to decipher that without luck. Could you 
walk me through it?

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-26  5:44       ` Donnie Berkholz
@ 2007-09-26  6:15         ` Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2007-09-26  6:15 UTC (permalink / raw
  To: gentoo-dev; +Cc: Donnie Berkholz

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

On Wednesday 26 September 2007, Donnie Berkholz wrote:
> On 00:02 Wed 26 Sep     , Stephen Bennett wrote:
> > On Tue, 25 Sep 2007 11:10:34 +0200
> >
> > Robert Buchholz <rbu@gentoo.org> wrote:
> > > I already wondered a while back:
> > > sed only fails if the file does not exist, but not if there was no
> > > replacement. Is there any way to force it to?
> >
> > Off the top of my head...
> >
> > sed -e '1{x;s/^/0/;x;ta;:a}'
> > -e 's/$STRING/$REPLACEMENT/'
> > -e 'Tb;x;s/^/1/;x;:b;${p;x;/^0/Q1;Q0};'
>
> I spent a few minutes trying to decipher that without luck. Could you
> walk me through it?

sed maintains two buffers - pattern and hold (which start out empty) and 
that's the trick here

{ } - used to group commands together

1 - only match first line (it's an address match)
x - swap pattern space and hold space
s/^/0/ - turn the (now) empty pattern space into "0"
x - swap pattern space and hold space
ta - branch to label a if previous expression matched something
a: - the actual label "a" ... needed to reset branching conditions

Tb - branch to label b if previous expression matched something
x - swap pattern space and hold space
s/^/1/ - insert "1" into the pattern space
x - swap pattern space and hold space
:b - the actual label "b'

$ - only match the last line (it's an address match)
p - print current pattern space
x - swap pattern space and hold space
/^0/Q1;Q0 - if the pattern space starts with a 0, exit with 1 ... otherwise 
continue on to the exit with 0 ... either way, quit without printing

the optional argument to Q is a GNU extension which isnt documented in the 
manpage :( ... guess i'll send them a patch

pretty sure the first expression can be dropped:
sed -e 's/$STRING/$REPLACEMENT/' \
-e 'tb;x;s/^/1/;x;:b;${p;x;/^$/Q1;Q0};'

and the printing makes it a little reliant on how sed is used ... i think 
something like this should work with -n:
-e 'Tb;x;s/^/1/;x;:b;${x;/^$/{x;q1};x;q0}'
-mike

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

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

* [gentoo-dev]  Re: Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild
  2007-09-25  9:10   ` Robert Buchholz
  2007-09-25 14:45     ` Mike Frysinger
  2007-09-25 23:02     ` Stephen Bennett
@ 2007-09-26  9:38     ` Steve Long
  2 siblings, 0 replies; 9+ messages in thread
From: Steve Long @ 2007-09-26  9:38 UTC (permalink / raw
  To: gentoo-dev

Robert Buchholz wrote:

> On Tuesday, 25. September 2007, Donnie Berkholz wrote:
>> On 20:04 Mon 24 Sep     , Doug Goldstein (cardoe) wrote:
>> > if ! use usb; then
>> > sed -i util/Makefile \
>> > -e '/ttusb_dec_reset/d' \
>> > -e '/dib3000-watch/d'
>> > fi
>> >
>> > # do not compile test-progs
>> > sed -i Makefile -e '/-C test/d'
>>
>> You might want to die if these seds fail.
> 
> I already wondered a while back:
> sed only fails if the file does not exist, but not if there was no
> replacement. Is there any way to force it to?
> 
ed will exit with an error if a regex doesn't match:
ed -s util/Makefile <<< 'H
/ttusb_dec_reset/d
/dib3000-watch/d
w
q' || die 'ohNoes!'

I prefer to mute errors in an ebuild (after testing):
ed -s Makefile 2>/dev/null <<< $'/-C test/d\nw\nq' \
        || die 'No match in Makefile'
..which I think is a lot easier to grok than the sed convolutions.
If it's supposed to be deleting every line with that regex (as the sed
currently does) I'd use: $'g/-C test/d\nw\nq'

I appreciate that ed seems hard (man ed is frightening!) but once you get
used to here-strings (and $' expansion) it's a doddle. (Use ,p instead of w
to see the output during testing.)
Tutorial: http://bash-hackers.org/wiki/doku.php?id=howto:edit-ed
Easier man page: http://plan9.bell-labs.com/magic/man2html/1/ed
Reference: http://www.opengroup.org/onlinepubs/009695399/utilities/ed.html

(I very much recommend that opengroup site as it outlines what a scripwriter
or programmer can expect on any POSIX/SuS compliant system.)


-- 
gentoo-dev@gentoo.org mailing list



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

end of thread, other threads:[~2007-09-26  9:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1IZuAp-0003SW-W2@stork.gentoo.org>
2007-09-25  0:33 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in media-tv/linuxtv-dvb-apps: ChangeLog linuxtv-dvb-apps-1.1.1.20070924.ebuild Donnie Berkholz
2007-09-25  9:10   ` Robert Buchholz
2007-09-25 14:45     ` Mike Frysinger
2007-09-25 23:02     ` Stephen Bennett
2007-09-26  5:44       ` Donnie Berkholz
2007-09-26  6:15         ` Mike Frysinger
2007-09-26  9:38     ` [gentoo-dev] " Steve Long
2007-09-25 14:16   ` [gentoo-dev] " Doug Goldstein
2007-09-26  1:19     ` Donnie Berkholz

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