portage
portage copied to clipboard
sync: don't use ipv6 for rsync when it's disabled
socket.has_ipv6 gives a false result:
$ sysctl net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.all.disable_ipv6 = 1
$ python
Python 3.11.8 (main, Feb 24 2024, 17:10:38) [GCC 13.2.1 20240210] on linux Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.has_ipv6
True
This patch uses the built-in _has_ipv6() function, which returns the correct result.
Bug: https://bugs.gentoo.org/927241
Thanks @0x501D this looks great! Can you add a sign off to comply with our Certificate of Origin?
Thanks @0x501D this looks great! Can you add a sign off to comply with our Certificate of Origin?
Sign off added.
Linter errors was fixed.
This patch uses the built-in _has_ipv6() function, which returns the correct result.
Nit: there is no "built-in" _has_ipv6() function. I would refer to portage.process._has_ipv6()
instead.
This patch uses the built-in _has_ipv6() function, which returns the correct result.
Nit: there is no "built-in" _has_ipv6() function. I would refer to
portage.process._has_ipv6()
instead.
Thanks. Commit message was fixed.
I suppose we should remove the underscore from the front of the function name if we are going to call it from another module. It's no longer a "private" function.
I suppose we should remove the underscore from the front of the function name if we are going to call it from another module. It's no longer a "private" function.
Done. Added in a separate commit.
Perfect, thank you.