#712155 wget: -O does not work as described wrt timestamps

Package:
wget
Source:
wget
Description:
retrieves files from the web
Submitter:
"Christopher Huhn, GSI"
Date:
2015-08-18 09:03:04 UTC
Severity:
normal
#712155#5
Date:
2013-06-13 15:20:15 UTC
From:
To:
Hi all,

wget's manpage says:

but:
page as the naked wget and behaves clearly different from '-O - > file' here.

Cheers,
	Christopher

#712155#10
Date:
2013-06-13 19:50:18 UTC
From:
To:
While it's true that -O file gets the timestamp (mainly because it
can, whereas - generally can't), the text of the documentation is
still exactly correct: the file is immediately truncated (opened
O_TRUNC or "w" mode or what have you), before any timestamping checks
are done rendering -N entirely useless in combination with it. Whether
this is great design or not isn't really the issue (personally I kind
of loathe the way -O was implemented, but didn't want to mess too much
with history when I was maintaining it); it's the way it's been since
the beginning. And the major point is that since it's opened in write
mode, the timestamp will always be "now" at the moment it's opened.

Giuseppe (current upstream maintainer) might entertain a bug report
against that (or might not), but the documentation correctly describes
the current behavior. It's also possible that newer wgets have already
changed this behavior, though I kind of doubt it.

To be clear, the test of the documentation's statement wouldn't be to
check whether the file has a timestamp after downloading; it would be
to check whether -N gets honored (refuses to download in the event
that the timestamp of any existing file matches the remote).

#712155#15
Date:
2015-08-18 08:44:35 UTC
From:
To:
URL:
  <http://savannah.gnu.org/bugs/?45789>

                 Summary: wget: -O does not work as described wrt timestamps
                 Project: GNU Wget
            Submitted by: nok
            Submitted on: Di 18 Aug 2015 10:44:34 CEST
                Category: Documentation
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
        Operating System: None
         Reproducibility: None
           Fixed Release: None
         Planned Release: None
              Regression: None
           Work Required: None
          Patch Included: None

instead of the one in the URL;" rather, it is
intended to work like wget -O - http://foo >
content will be written there.
combination with -O: since file is always
will be issued if this combination is

but:
timestamp of the last change of the web
page as the naked wget and behaves clearly different from '-O - > file' here.
--8<--

https://bugs.debian.org/712155

Additional there is a comment on this from former maintainer Micah in this
report but I want to be sure and verifiy if you think if is or is not
something which might be corrected.

thx

#712155#26
Date:
2015-08-18 08:50:01 UTC
From:
To:
forwarded 712155 https://savannah.gnu.org/bugs/?45789
tags 712155 + upstream
thanks

Hello,

your reported bug https://bugs.debian.org/712155 was commented by the
maintainer on the same day but to be sure I submitted it to the
upstream BTS.

Regards

	Noël