Avoid creating empty wget-log when using -O and -q in background (#1484411)

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2018-08-30 12:02:12 +02:00
parent f1a78e706c
commit d304d4f735
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 7ddcebd61e170fb03d361f82bf8f5550ee62a1ae Mon Sep 17 00:00:00 2001
From: Tomas Korbar <tkorbar@redhat.com>
Date: Wed, 29 Aug 2018 12:33:43 +0200
Subject: [PATCH] Avoid creating empty wget-log when using -O and -q in
background
* src/log.c (check_redirect_output): Check for quiet mode
---
src/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/log.c b/src/log.c
index d879dffe..e8cca2f3 100644
--- a/src/log.c
+++ b/src/log.c
@@ -974,7 +974,7 @@ check_redirect_output (void)
{
pid_t foreground_pgrp = tcgetpgrp (STDIN_FILENO);
- if (foreground_pgrp != -1 && foreground_pgrp != getpgrp ())
+ if (foreground_pgrp != -1 && foreground_pgrp != getpgrp () && !opt.quiet)
{
/* Process backgrounded */
redirect_output (true,NULL);
--
2.17.1

View File

@ -1,13 +1,14 @@
Summary: A utility for retrieving files using the HTTP or FTP protocols
Name: wget
Version: 1.19.5
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv3+
Group: Applications/Internet
Url: http://www.gnu.org/software/wget/
Source: ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.gz
Patch1: wget-1.17-path.patch
Patch2: wget-1.19.5-no-log-when-quiet.patch
Provides: webclient
Provides: bundled(gnulib)
@ -32,6 +33,7 @@ sed -i "s|\(PACKAGE_STRING='wget .*\)'|\1 (Red Hat modified)'|" configure
grep "PACKAGE_STRING='wget .* (Red Hat modified)'" configure || exit 1
%patch1 -p1 -b .path
%patch2 -p1 -b .no_log_quiet
%build
%configure \
@ -66,6 +68,9 @@ make check
%{_infodir}/*
%changelog
* Thu Aug 29 2018 Tomas Hozza <thozza@redhat.com> - 1.19.5-5
- Avoid creating empty wget-log when using -O and -q in background (#1484411)
* Tue Aug 28 2018 Tomas Korbar <tkorbar@redhat.com> - 1.19.5-4
- Add zlib-devel to buildrequires (#1612891)