Bug 1484411 - Running wget with -O and -q in the background yields a file wget-log
Summary: Running wget with -O and -q in the background yields a file wget-log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: wget
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Hozza
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-23 13:50 UTC by Adri Verhoef
Modified: 2018-09-21 05:24 UTC (History)
3 users (show)

Fixed In Version: wget-1.19.5-5.fc28 wget-1.19.5-5.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-02 05:56:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix quiet option (630 bytes, patch)
2018-08-28 07:16 UTC, Tomas Korbar
thozza: review+
Details | Diff

Description Adri Verhoef 2017-08-23 13:50:39 UTC
Description of problem:
Running 'wget -q -O out' in the foreground is quiet, but running it in the background isn't: it yields a logfile.  This wasn't the case in Fedora 25 (wget-1.18).

Version-Release number of selected component (if applicable):
wget-1.19.1-3.fc26.x86_64

How reproducible:
By comparing running 'wget -q -O out' in the foreground and in the background.

Steps to Reproduce:
1. wget -q -O /dev/null nu.nl
2. wget -q -O /dev/null nu.nl &

Actual results:
The option -q tells wget to be quiet, in the foreground as well as in the background.
However, the first command doesn't yield a logfile, the second does:
$ wget -q -O /dev/null nu.nl
$ wget -q -O /dev/null nu.nl &
[1] 24925

Redirecting output to ‘wget-log’.


Expected results:
In both cases — running 'wget -q -O out' in the foreground and running it in the background — wget should be quiet.

Additional info:
On Fedora 25, wget (1.18) is quiet when running in the background with options -q and -O.

The created logfile is empty (thanks to the -q option), so it's just pollution.

Story: on Fedora 25, a shell job that contains 'wget -q -O outputfile URL' doesn't yield a file "wget-log", and it doesn't matter if you run it in the foreground or in the background.  This shell job ran each half hour in a terminal in the background.
When I switched to Fedora 26 (wget-1.19), to my surprise running the same shell job in a terminal in the background suddenly yielded files wget-log, wget-log.1, wget-log.2 etc.
Running the same script in the foreground stopped this behaviour, but the purpose was to run it in the background, like it did on Fedora 25 without yielding a file wget-log.

This behaviour is inconsistent, I tell wget to be quiet:
$ wget -q -O out URL
<ctrl-Z>
$ bg
Redirecting output to ‘wget-log’.
...This is not my definition of quiet...

       -q
       --quiet
           Turn off Wget's output.

...You can imagine it creates a lot of logfiles when running in a tight loop in a shell script.

Comment 1 Fedora End Of Life 2018-05-03 08:10:23 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Jan Kurik 2018-08-14 10:18:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 3 Tomas Korbar 2018-08-28 07:13:04 UTC
Hello,
this problem is caused by automatic redirection of logs to default log file when wget runs in background. Unfortunately wget does not check if the quiet option is provided and automatically creates file in initialization of logs. The patch im attaching adds condition to redirection of logs and prevents the creation of file.

Comment 4 Tomas Korbar 2018-08-28 07:16:56 UTC
Created attachment 1479150 [details]
Fix quiet option

Comment 5 Tomáš Hozza 2018-08-28 10:00:30 UTC
Comment on attachment 1479150 [details]
Fix quiet option

The patch looks good.

Comment 6 Fedora Update System 2018-08-30 10:26:11 UTC
wget-1.19.5-5.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9c4a49af37

Comment 7 Fedora Update System 2018-08-30 10:26:21 UTC
wget-1.19.5-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c9501d5ea8

Comment 8 Fedora Update System 2018-08-30 15:01:30 UTC
wget-1.19.5-5.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-9c4a49af37

Comment 9 Fedora Update System 2018-08-30 19:29:30 UTC
wget-1.19.5-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c9501d5ea8

Comment 10 Fedora Update System 2018-09-02 05:56:37 UTC
wget-1.19.5-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-09-21 05:24:38 UTC
wget-1.19.5-5.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.