diff options
author | Nicholas Vinson <nvinson234@gmail.com> | 2016-07-23 10:40:59 -0700 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-08-11 08:34:57 +0200 |
commit | 7386f397410d6c8d4941d947e8a8ffaa81ac5511 (patch) | |
tree | f1ff28a974fb2f4b9208d53bbc690bf55df3ab04 /net-firewall/ufw | |
parent | dev-ruby/rack-openid: add ruby23 (diff) | |
download | gentoo-7386f397410d6c8d4941d947e8a8ffaa81ac5511.tar.gz gentoo-7386f397410d6c8d4941d947e8a8ffaa81ac5511.tar.bz2 gentoo-7386f397410d6c8d4941d947e8a8ffaa81ac5511.zip |
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 <monsieurp@gentoo.org>
Diffstat (limited to 'net-firewall/ufw')
-rw-r--r-- | net-firewall/ufw/ufw-0.35.ebuild | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/net-firewall/ufw/ufw-0.35.ebuild b/net-firewall/ufw/ufw-0.35.ebuild index 8fec635a0331..e9f95f18ad66 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" |