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

 
 

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

Submitter:  Ville Skyttä <scop>
Submitted:  Thu 10 Apr 2008 03:54:17 PM UTC
   
 
Category:  Program Logic Severity:  2 - Minor
Priority:  6 Status:  Fixed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  1.11 Operating System:  None
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  1.11.2 Regression:  Yes
Work Required:  None Patch Included:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-04-27 micahcowan Open/ClosedOpen Closed
    2008-04-27 micahcowan StatusNeeds Discussion Fixed
    2008-04-10 micahcowan Severity3 - 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.13-758e.
    Corresponding source code