Skip to content

Commit

Permalink
sysutils/ansible: Chase 58df5a82adc40a6959e9b22c, net/py-netaddr update
Browse files Browse the repository at this point in the history
net/py-netaddr 1.2.1 deprecated and removed the is_private method.
This breaks ansible-collections which is bundled this port's tarball.
The upstream patch uses the is_global methhod instead.

Reported by:	Einar Bjarni Halldorsson <einar@isnic.is>
Obtained from:	ansible-collections/ansible.utils#338

(cherry picked from commit 698ed6d)
  • Loading branch information
cschuber committed May 15, 2024
1 parent c51c316 commit 5be809d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions sysutils/ansible/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PORTNAME= ansible
DISTVERSION= 8.5.0
PORTREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- ansible_collections/ansible/utils/plugins/plugin_utils/base/ipaddr_utils.py.orig 2023-09-07 02:17:47.000000000 -0700
+++ ansible_collections/ansible/utils/plugins/plugin_utils/base/ipaddr_utils.py 2024-05-15 08:23:34.190190000 -0700
@@ -289,7 +289,7 @@
def _private_query(v, value):
- if v.is_private():
+ if not v.ip.is_global():
return value


@@ -298,7 +298,7 @@
if all(
[
v_ip.is_unicast(),
- not v_ip.is_private(),
+ v_ip.is_global(),
not v_ip.is_loopback(),
not v_ip.is_netmask(),
not v_ip.is_hostmask(),

0 comments on commit 5be809d

Please sign in to comment.