bugCompact Disc Input and Control Library - Bugs: bug #29307, --no-header should omit warranty...

 
 

bug #29307: --no-header should omit warranty info too

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Mon 22 Mar 2010 11:26:26 PM UTC  
 
Category: NoneSeverity: 5 - Average
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Rocky Bernstein <rocky>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 04 Oct 2011 08:40:01 AM UTC, comment #4:

Patch applied as is. Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Fri 30 Sep 2011 06:47:16 PM UTC, comment #3:

Regression test is easy: all test outputs that currently expect that header must be modified to not expect it. Without that, all checks would suddenly fail.

But I guess you'd also want some test ensuring that the WITHOUT the --no-header switch, the current legalese is still printed. I've attached a patch for that as well, and rewritten check_common_fn a good deal in the progress. Take it if you like it, but if you commit only the other one, I'll be just as happy.

(file #24057, file #24058)

Martin von Gagern <gagern>
Tue 23 Mar 2010 08:35:38 PM UTC, comment #2:

Sorry for the delay.

Submit a patch and it will probably be applied. Bonus points if you include a regression test too.

Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Mon 22 Mar 2010 11:51:45 PM UTC, comment #1:

specifically, i'd like behavior such as:

--- a/src/util.c
+++ b/src/util.c
@@ -49,6 +49,7 @@
report( stdout,
"%s version %s\nCopyright (c) 2003, 2004, 2005, 2007, 2008 R. Bernstein\n",
program_name, version);
+ if (no_header == 0)
report( stdout,
_("This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\

Mike Frysinger <vapier>
Mon 22 Mar 2010 11:26:26 PM UTC, original submission:

`cd-info` always writes stuff to stdout even when using --no-header and when an error was encountered. for example:

$ echo > moo

$ cd-info --no-header moo
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
cd-info: Error in automatically selecting driver for input moo.

$ cd-info --no-header moo >/dev/null
cd-info: Error in automatically selecting driver for input moo.

this is annoying for trying to integrate cd-info (and related utilities) into scripts

Mike Frysinger <vapier>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24057:  no-header.patch added by gagern (11KiB - text/x-patch - Patch and UI test)
file #24058:  test_legal_header.patch added by gagern (5KiB - text/x-patch - Patch and UI test)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gagern (Updated the item)
  • -unavailable- added by rocky (Posted a comment)
  • -unavailable- added by vapier (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 04 Oct 2011 08:40:01 AM UTCrockyStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 30 Sep 2011 06:47:16 PM UTCgagernAttached File-=>Added no-header.patch, #24057
      Attached File-=>Added test_legal_header.patch, #24058
    Tue 23 Mar 2010 08:35:38 PM UTCrockyAssigned toNone=>rocky

    Back to the top


    Powered by Savane 3.1-cleanup1