summaryrefslogtreecommitdiff
path: root/app-admin/salt/files/salt-3000.2-py38.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-14 11:09:11 +0100
commitdeba8115d2c2af26df42966b91ef04ff4dd79cde (patch)
tree9a48f42594e1a9e6b2020d5535a784314434d7a7 /app-admin/salt/files/salt-3000.2-py38.patch
parent38423c67c8a23f6a1bc42038193182e2da3116eb (diff)
gentoo resync : 14.05.2020
Diffstat (limited to 'app-admin/salt/files/salt-3000.2-py38.patch')
-rw-r--r--app-admin/salt/files/salt-3000.2-py38.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/app-admin/salt/files/salt-3000.2-py38.patch b/app-admin/salt/files/salt-3000.2-py38.patch
new file mode 100644
index 000000000000..1c543a085b10
--- /dev/null
+++ b/app-admin/salt/files/salt-3000.2-py38.patch
@@ -0,0 +1,60 @@
+From 5259ba8ef6e5949815641edc563deab67ba68582 Mon Sep 17 00:00:00 2001
+From: Mathias Fussenegger <f.mathias@zignar.net>
+Date: Fri, 22 Nov 2019 17:05:27 +0100
+Subject: [PATCH] Remove _supported_dists import for python-3.8 support
+
+`_supported_dists` has been removed from platform in Python 3.8:
+
+ https://github.com/python/cpython/commit/8b94b41ab7b12f745dea744e8940631318816935#diff-47c8e5750258a08a6dd9de3e9c3774acL267-L271
+
+This instead inlines all the values that have been there.
+
+Without this change running `salt-ssh` with Python 3.8 run into an
+import error.
+---
+ salt/grains/core.py | 31 +++++++++++++++++++++++++++----
+ 1 file changed, 27 insertions(+), 4 deletions(-)
+
+diff --git a/salt/grains/core.py b/salt/grains/core.py
+index 04c1ae91b5f5..77694abe84f9 100644
+--- a/salt/grains/core.py
++++ b/salt/grains/core.py
+@@ -35,11 +35,34 @@
+ __proxyenabled__ = ['*']
+ __FQDN__ = None
+
+-# Extend the default list of supported distros. This will be used for the
++# Default list of supported distros. This will be used for the
+ # /etc/DISTRO-release checking that is part of linux_distribution()
+-from platform import _supported_dists
+-_supported_dists += ('arch', 'mageia', 'meego', 'vmware', 'bluewhite64',
+- 'slamd64', 'ovs', 'system', 'mint', 'oracle', 'void')
++_supported_dists = (
++ 'SuSE',
++ 'UnitedLinux',
++ 'arch',
++ 'bluewhite64',
++ 'centos',
++ 'debian',
++ 'fedora',
++ 'gentoo',
++ 'mageia',
++ 'mandrake',
++ 'mandriva',
++ 'meego',
++ 'mint',
++ 'oracle',
++ 'ovs',
++ 'redhat',
++ 'rocks',
++ 'slackware',
++ 'slamd64',
++ 'system',
++ 'turbolinux',
++ 'vmware',
++ 'void',
++ 'yellowdog',
++)
+
+ # linux_distribution deprecated in py3.7
+ try: