From nobody Sat Sep 14 07:36:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X5NKM4X5cz5W5Pf; Sat, 14 Sep 2024 07:36:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X5NKM2NGTz4fxK; Sat, 14 Sep 2024 07:36:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726299399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLT1+BYroPJPVKMVA2MEwHMICJ5lGObnmWMv+l0eIFg=; b=v8FKVuvOrNRZbldzloPLpWqtAnmJkuIRgB+7fuC6r6F3UWvCvparf1w2M/YtdUwPWpinpY SJXp6Dbk9r+6CG1guzgFSS5dJc1uUgyfeSfthj4+BRHYLdCeUE0CoIBQ59C1L3F0ZNbPre kzZolofgj9C6p2JZI1uPSiRJUTjo49TEzeDmNkJmEGjrzPOUifjsa/h6Y5V0lyc28EOk+X GukheT4NlxDyPXvD0ug6kiduzrenWyxM9xaX/ecgkX93uCpUzBg8ZjiBN4ZpUTplDJRabs SS5ZlES3tPZtTY1SaB1MCSBdMGai4vIFC5piY9RsjKvMEbmkixGwC3c6u2CiAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726299399; a=rsa-sha256; cv=none; b=reeu3SOd0RcKoKAqRbUcw3AoBq52AV7GbtbOt0Mcngmv0YD3r6O/HLRogaMhlC5KVVPOgh b37FeSwmAGNz4vY+ALa2SqWilNaqlU5PvzP9FtdAVhvm7O80vm3T2td+3ZnfusAdqolyDK mowNEZUR7hHExbyWIRlO7/3l8uoJxUH1Xgd8QStGgWVJV1v2vSLRxmGg1V9IbqPnm+a88X AflDZ3XlGW9UgJrqyjhFkkRM4mcusroM1XsGmnVwHqTUE0DOacvEw5ol9s1Tray3NB3lxB eYCmHnIDdlHM0eswwx9Kw7nqTppBvr9RIlF8v+2wM9ROnmVX6pj29fje3+tryg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726299399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oLT1+BYroPJPVKMVA2MEwHMICJ5lGObnmWMv+l0eIFg=; b=PdQM1JnQtvervxFJkoWPtAplLNtjyvcsfLCUdRQrwJ02kbT+W9rfyn3qIOGQzDcRBSeuYY 38YKsW8fquncQR9nxGkhRKc+xInYKH4M5vC5OEuDd7CX5YsKkOnergRkrqGPcCTSrxLqCd bY6PtUkMwTD+d1gCxifm3A4ZAodyFGSlsHGWmH7y52lA1PyXZuxKexZmQkrid8oi5gNpWx wRgOkg/RMaNqOyttzVzm4Oa+XOyiju7sAr4bp3959Qk0Rjpne5SfCG/6HRb32m242V+WN8 PW0Qs7gnU8RC1OpfqzKEWfQS1oQpRxYMjFmBRW0MyS6avMDpHEA/4P1YTiNz4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X5NKM1LqTzJ8g; Sat, 14 Sep 2024 07:36:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48E7ade6032526; Sat, 14 Sep 2024 07:36:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48E7adTY032523; Sat, 14 Sep 2024 07:36:39 GMT (envelope-from git) Date: Sat, 14 Sep 2024 07:36:39 GMT Message-Id: <202409140736.48E7adTY032523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 251d93eda084 - stable/13 - MFC: fetch(1): suppress "Not Modified" in quiet mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 251d93eda084cbae31cb89b42a0a11d4a3121d81 Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=251d93eda084cbae31cb89b42a0a11d4a3121d81 commit 251d93eda084cbae31cb89b42a0a11d4a3121d81 Author: Eugene Grosbein AuthorDate: 2024-09-07 02:14:23 +0000 Commit: Eugene Grosbein CommitDate: 2024-09-14 07:22:49 +0000 MFC: fetch(1): suppress "Not Modified" in quiet mode "fetch -qi" should skip printing "Not Modified" for successful http(s) request. Still print it by default (v_level == 1). (cherry picked from commit 7a6309fdc79427b0a7a5c3876daba150d946ae22) --- usr.bin/fetch/fetch.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 8be5742386e7..bb7d27d896b6 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -583,16 +583,17 @@ again: if (sigalrm || sigint) goto signal; if (f == NULL) { - warnx("%s: %s", URL, fetchLastErrString); - if (i_flag && (strcmp(url->scheme, SCHEME_HTTP) == 0 || - strcmp(url->scheme, SCHEME_HTTPS) == 0) && - fetchLastErrCode == FETCH_OK && + if (i_flag && *is_http && fetchLastErrCode == FETCH_OK && strcmp(fetchLastErrString, "Not Modified") == 0) { /* HTTP Not Modified Response, return OK. */ + if (v_level > 0) + warnx("%s: %s", URL, fetchLastErrString); r = 0; goto done; - } else + } else { + warnx("%s: %s", URL, fetchLastErrString); goto failure; + } } if (sigint) goto signal;