From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4FCC1158087 for ; Mon, 7 Feb 2022 02:27:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07B0D2BC002; Mon, 7 Feb 2022 02:27:15 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7181D2BC002 for ; Mon, 7 Feb 2022 02:27:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 61CF3342DB8 for ; Mon, 7 Feb 2022 02:27:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C650924E for ; Mon, 7 Feb 2022 02:27:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1644200477.d18f8f70b9d8d712a7a71b78091b407a9dd5bb92.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/man-db/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/man-db/man-db-2.10.0.ebuild sys-apps/man-db/man-db-9999.ebuild X-VCS-Directories: sys-apps/man-db/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d18f8f70b9d8d712a7a71b78091b407a9dd5bb92 X-VCS-Branch: master Date: Mon, 7 Feb 2022 02:27:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5b2992e4-2e58-453e-b176-30b1edf480b9 X-Archives-Hash: 23ff333f4a9a36b93ebf8524629871e8 commit: d18f8f70b9d8d712a7a71b78091b407a9dd5bb92 Author: Sam James gentoo org> AuthorDate: Mon Feb 7 02:20:12 2022 +0000 Commit: Sam James gentoo org> CommitDate: Mon Feb 7 02:21:17 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d18f8f70 sys-apps/man-db: fix use of REPLACING_VERSIONS Closes: https://bugs.gentoo.org/589514 Signed-off-by: Sam James gentoo.org> sys-apps/man-db/man-db-2.10.0.ebuild | 19 ++++++++++++++----- sys-apps/man-db/man-db-9999.ebuild | 19 ++++++++++++++----- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/sys-apps/man-db/man-db-2.10.0.ebuild b/sys-apps/man-db/man-db-2.10.0.ebuild index 6948c20167a5..f49d58338bd1 100644 --- a/sys-apps/man-db/man-db-2.10.0.ebuild +++ b/sys-apps/man-db/man-db-2.10.0.ebuild @@ -163,8 +163,8 @@ pkg_preinst() { # see bug #602588 comment 18 local _replacing_version= local _setgid_vuln=0 - for _replacing_version in ${REPLACING_VERSIONS}; do - if ver_test '2.7.6.1-r2' -le "${_replacing_version}"; then + for _replacing_version in ${REPLACING_VERSIONS} ; do + if ver_test '2.7.6.1-r2' -le "${_replacing_version}" ; then debug-print "Skipping security bug #602588 ... existing installation (${_replacing_version}) should not be affected!" else _setgid_vuln=1 @@ -189,8 +189,17 @@ pkg_preinst() { pkg_postinst() { tmpfiles_process man-db.conf - if [[ $(ver_cut 2 ${REPLACING_VERSIONS}) -lt 7 ]] ; then - einfo "Rebuilding man-db from scratch with new database format!" - su man -s /bin/sh -c 'mandb --quiet --create' 2>/dev/null + if [[ -n "${REPLACING_VERSIONS}" ]] ; then + local _replacing_version= + + for _replacing_version in ${REPLACING_VERSIONS} ; do + if [[ $(ver_cut 2 ${_replacing_version}) -lt 7 ]] ; then + einfo "Rebuilding man-db from scratch with new database format!" + su man -s /bin/sh -c 'mandb --quiet --create' 2>/dev/null + + # No need to run it again if we hit one + break + fi + done fi } diff --git a/sys-apps/man-db/man-db-9999.ebuild b/sys-apps/man-db/man-db-9999.ebuild index c0406d043a09..0c5780d1e7bf 100644 --- a/sys-apps/man-db/man-db-9999.ebuild +++ b/sys-apps/man-db/man-db-9999.ebuild @@ -161,8 +161,8 @@ pkg_preinst() { # see bug #602588 comment 18 local _replacing_version= local _setgid_vuln=0 - for _replacing_version in ${REPLACING_VERSIONS}; do - if ver_test '2.7.6.1-r2' -le "${_replacing_version}"; then + for _replacing_version in ${REPLACING_VERSIONS} ; do + if ver_test '2.7.6.1-r2' -le "${_replacing_version}" ; then debug-print "Skipping security bug #602588 ... existing installation (${_replacing_version}) should not be affected!" else _setgid_vuln=1 @@ -187,8 +187,17 @@ pkg_preinst() { pkg_postinst() { tmpfiles_process man-db.conf - if [[ $(ver_cut 2 ${REPLACING_VERSIONS}) -lt 7 ]] ; then - einfo "Rebuilding man-db from scratch with new database format!" - su man -s /bin/sh -c 'mandb --quiet --create' 2>/dev/null + if [[ -n "${REPLACING_VERSIONS}" ]] ; then + local _replacing_version= + + for _replacing_version in ${REPLACING_VERSIONS} ; do + if [[ $(ver_cut 2 ${_replacing_version}) -lt 7 ]] ; then + einfo "Rebuilding man-db from scratch with new database format!" + su man -s /bin/sh -c 'mandb --quiet --create' 2>/dev/null + + # No need to run it again if we hit one + break + fi + done fi }