bugGNU Wget - Bugs: bug #22896, -O with -N, -p, -k should be...

 
 

bug #22896: -O with -N, -p, -k should be warnings, not errors

Submitted by:  Ville Skyttä <scop>
Submitted on:  Thu 10 Apr 2008 03:54:17 PM UTC  
 
Category: Program LogicSeverity: 2 - Minor
Priority: 6Status: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: 1.11Operating System: None
Reproducibility: Every TimeFixed Release: None
Planned Release: 1.11.2Regression: Yes
Work Required: NonePatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Sun 27 Apr 2008 09:22:06 AM UTC, comment #6:

Additional note: keeping it directed at stdout, for now, for consistency with several other such cases, and to change as little as possible for a bugfix 1.11.2 release. It should all be moved to stderr, though, at some future point, ideally for 1.12.

Micah Cowan <micahcowan>
Sun 27 Apr 2008 09:17:37 AM UTC, comment #5:

Kept -N as an error for now, as it seems to be helping to make people aware of problems.

Fixed for eleven in 8a6bd29ff1a9.
Fixed for mainline in a450d051ccd3.

Micah Cowan <micahcowan>
Thu 10 Apr 2008 11:42:41 PM UTC, comment #4:

At the very least though, the message should go to stderr, whereas it currently goes to stdout.

Micah Cowan <micahcowan>
Thu 10 Apr 2008 11:34:26 PM UTC, comment #3:

On the other hand, the fact that it's a warning seems to be drawing to many peoples' attention that -O and -N never worked int he first place, which appears to be a surprise. It's important that people not use -O and -N together, if by this use they expect that Wget will actually compare the "old" timestamp with the server's.

Micah Cowan <micahcowan>
Thu 10 Apr 2008 06:50:44 PM UTC, comment #2:

Thanks.

Getting somewhat off topic here, but in a similar vein, I think unrecognized options given with '-e "foo = bar"' (and perhaps also in wgetrc) would be better reported as warnings instead of fatal errors.

Ville Skyttä <scop>
Thu 10 Apr 2008 04:18:07 PM UTC, comment #1:

AIUI, -N and -O never worked together, at least not in the expected way. Bug 20715 is not a bug, as timestamping was never intended to work with -O at all. -O is intended to work essentially like shell redirection, not like file renaming (the advisability of that is, IMO, questionable, but anyway...)

Your recommendation that they should be warnings rather than errors makes sense to me, though. Rephrasing accordingly.

Micah Cowan <micahcowan>
Thu 10 Apr 2008 03:54:17 PM UTC, original submission:

Disallowing -N with -O is IMNSHO a regression, and will produce quite uninformative error messages eg. if one has "timestamping = on" in ~/.wgetrc and does a "wget -O ..."

The -N and -O combination issues in bug 20715 look like bugs indeed, but disabling the use of -N and -O as a result seems to me as brushing the real problem under the carpet, and while doing so, introducing a backwards compatibility issue without a good reason. I can't think of a real fundamental reason why -N and -O would be mutually exclusive.

The result is that scripts that use -O (without '-e "timestamping = off"') used to work just fine, but now no longer work if there's a "timestamping = on" in wgetrc. If -N and -O cannot be fixed to work together, please make the result of their usage a warning instead of aborting with an error.

Similarly, I don't see a reason why -p and -O couldn't be used together (I don't know if this is a regression, I haven't used the combination earlier, but I noticed it when I finally found the error message explaining why my scripts no longer work after upgrading to 1.11 (the -N/-O issue)). The fetched "master" HTML document would just be written to the file requested with -O, and -O wouldn't affect the filenames of requisites.

Ville Skyttä <scop>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by micahcowan (Posted a comment)
  • -unavailable- added by scop (Submitted the item)
  •  

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

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Apr 2008 09:17:37 AM UTCmicahcowanOpen/ClosedOpen=>Closed
    Sun 27 Apr 2008 09:17:36 AM UTCmicahcowanStatusNeeds Discussion=>Fixed
    Thu 10 Apr 2008 04:18:07 PM UTCmicahcowanSeverity3 - Normal=>2 - Minor
      Priority5 - Normal=>6
      StatusNone=>Needs Discussion
      Planned ReleaseNone=>1.11.2
      SummaryRegression: -N disallowed with -O=>-O with -N, -p, -k should be warnings, not errors

    Back to the top


    Powered by Savane 3.1-cleanup1