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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D498013832E for ; Thu, 11 Aug 2016 06:35:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 054B421C0F3; Thu, 11 Aug 2016 06:35:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5FD4021C0F3 for ; Thu, 11 Aug 2016 06:35:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6AEF340BC9 for ; Thu, 11 Aug 2016 06:35:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DEA932455 for ; Thu, 11 Aug 2016 06:35:01 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1470897297.7386f397410d6c8d4941d947e8a8ffaa81ac5511.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/ufw/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-firewall/ufw/ufw-0.35.ebuild X-VCS-Directories: net-firewall/ufw/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 7386f397410d6c8d4941d947e8a8ffaa81ac5511 X-VCS-Branch: master Date: Thu, 11 Aug 2016 06:35:01 +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-Archives-Salt: 17134fe6-1d39-42ea-abda-e81418e8ccc0 X-Archives-Hash: ada7afbcb9dc7fda5fb88a880d83217e commit: 7386f397410d6c8d4941d947e8a8ffaa81ac5511 Author: Nicholas Vinson gmail com> AuthorDate: Sat Jul 23 17:40:59 2016 +0000 Commit: Patrice Clement gentoo org> CommitDate: Thu Aug 11 06:34:57 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7386f397 net-firewall/ufw: Properly handle cases where |RV| > 1. Properly handle cases where REPLACING_VERSIONS has more than 1 element. Gentoo-Bug: https://bugs.gentoo.org/589484 Package-Manager: portage-2.3.0 Closes: https://github.com/gentoo/gentoo/pull/1946 Signed-off-by: Patrice Clement gentoo.org> net-firewall/ufw/ufw-0.35.ebuild | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net-firewall/ufw/ufw-0.35.ebuild b/net-firewall/ufw/ufw-0.35.ebuild index 8fec635..e9f95f1 100644 --- a/net-firewall/ufw/ufw-0.35.ebuild +++ b/net-firewall/ufw/ufw-0.35.ebuild @@ -162,6 +162,9 @@ python_install_all() { } pkg_postinst() { + local print_check_req_warn + print_check_req_warn=false + if [[ -z ${REPLACING_VERSIONS} ]]; then echo elog "To enable ufw, add it to boot sequence and activate it:" @@ -170,10 +173,17 @@ pkg_postinst() { echo elog "If you want to keep ufw logs in a separate file, take a look at" elog "/usr/share/doc/${PF}/logging." + print_check_req_warn=true + else + for rv in ${REPLACING_VERSIONS}; do + local major=${rv%%.*} + local minor=${rv#${major}.} + if [[ ${major} -eq 0 && ${minor} -lt 34 ]]; then + print_check_req_warn=true + fi + done fi - if [[ -z ${REPLACING_VERSIONS} ]] \ - || [[ ${REPLACING_VERSIONS} < 0.34 ]]; - then + if $print_check_req_warn; then echo elog "/usr/share/ufw/check-requirements script is installed." elog "It is useful for debugging problems with ufw. However one"