mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-06 04:46:42 +02:00
community/*: remove stale patches
This commit is contained in:
parent
f191b673ff
commit
fc97d5b86c
@ -1,75 +0,0 @@
|
||||
From 3349c1dba99da9963eb275ae6ac7cdb8ed0c0e1b Mon Sep 17 00:00:00 2001
|
||||
From: Boudewijn Rempt <boud@valdyas.org>
|
||||
Date: Sat, 11 Apr 2020 16:33:09 +0200
|
||||
Subject: [PATCH] Check whether the uiLanguages list isn't empty
|
||||
|
||||
Because Qt can crash or assert on list.first() if the list is
|
||||
empty.
|
||||
|
||||
BUG:419947
|
||||
---
|
||||
krita/main.cc | 35 ++++++++++++++++++-----------------
|
||||
1 file changed, 18 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/krita/main.cc b/krita/main.cc
|
||||
index e01fd10969..908f7abe03 100644
|
||||
--- a/krita/main.cc
|
||||
+++ b/krita/main.cc
|
||||
@@ -334,7 +334,6 @@ extern "C" int main(int argc, char **argv)
|
||||
qputenv("LANG", locale.name().toLocal8Bit());
|
||||
#endif
|
||||
|
||||
-
|
||||
const QStringList rtlLanguages = QStringList()
|
||||
<< "ar" << "dv" << "he" << "ha" << "ku" << "fa" << "ps" << "ur" << "yi";
|
||||
|
||||
@@ -366,28 +365,30 @@ extern "C" int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
- QString envLanguage = uiLanguages.first();
|
||||
- envLanguage.replace(QChar('-'), QChar('_'));
|
||||
+ if (uiLanguages.size() > 0 ) {
|
||||
+ QString envLanguage = uiLanguages.first();
|
||||
+ envLanguage.replace(QChar('-'), QChar('_'));
|
||||
|
||||
- for (int i = 0; i < uiLanguages.size(); i++) {
|
||||
- QString uiLanguage = uiLanguages[i];
|
||||
- // Strip the country code
|
||||
- int idx = uiLanguage.indexOf(QChar('-'));
|
||||
+ for (int i = 0; i < uiLanguages.size(); i++) {
|
||||
+ QString uiLanguage = uiLanguages[i];
|
||||
+ // Strip the country code
|
||||
+ int idx = uiLanguage.indexOf(QChar('-'));
|
||||
|
||||
- if (idx != -1) {
|
||||
- uiLanguage = uiLanguage.left(idx);
|
||||
- uiLanguages.replace(i, uiLanguage);
|
||||
+ if (idx != -1) {
|
||||
+ uiLanguage = uiLanguage.left(idx);
|
||||
+ uiLanguages.replace(i, uiLanguage);
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
- dbgKrita << "Converted ui languages:" << uiLanguages;
|
||||
+ dbgKrita << "Converted ui languages:" << uiLanguages;
|
||||
#ifdef Q_OS_MAC
|
||||
- // See https://bugs.kde.org/show_bug.cgi?id=396370
|
||||
- KLocalizedString::setLanguages(QStringList() << uiLanguages.first());
|
||||
- qputenv("LANG", (envLanguage + ".UTF-8").toLocal8Bit());
|
||||
+ // See https://bugs.kde.org/show_bug.cgi?id=396370
|
||||
+ KLocalizedString::setLanguages(QStringList() << uiLanguages.first());
|
||||
+ qputenv("LANG", (envLanguage + ".UTF-8").toLocal8Bit());
|
||||
#else
|
||||
- KLocalizedString::setLanguages(QStringList() << uiLanguages);
|
||||
- qputenv("LANG", envLanguage.toLocal8Bit());
|
||||
+ KLocalizedString::setLanguages(QStringList() << uiLanguages);
|
||||
+ qputenv("LANG", envLanguage.toLocal8Bit());
|
||||
#endif
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
python 3.8 removed linux_distribution support completely and leaves that
|
||||
functionality to third-party modules, which is provided by 'distro'.
|
||||
|
||||
Just completely remove the backwards compatibility and completely rely on that
|
||||
module.
|
||||
|
||||
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
||||
index 04c1ae9..9280975 100644
|
||||
--- a/salt/grains/core.py
|
||||
+++ b/salt/grains/core.py
|
||||
@@ -24,6 +24,7 @@ from errno import EACCES, EPERM
|
||||
import datetime
|
||||
import warnings
|
||||
import time
|
||||
+from distro import linux_distribution
|
||||
|
||||
# pylint: disable=import-error
|
||||
try:
|
||||
@@ -35,23 +36,6 @@ except ImportError:
|
||||
__proxyenabled__ = ['*']
|
||||
__FQDN__ = None
|
||||
|
||||
-# Extend 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')
|
||||
-
|
||||
-# linux_distribution deprecated in py3.7
|
||||
-try:
|
||||
- from platform import linux_distribution as _deprecated_linux_distribution
|
||||
-
|
||||
- def linux_distribution(**kwargs):
|
||||
- with warnings.catch_warnings():
|
||||
- warnings.simplefilter("ignore")
|
||||
- return _deprecated_linux_distribution(**kwargs)
|
||||
-except ImportError:
|
||||
- from distro import linux_distribution
|
||||
-
|
||||
# Import salt libs
|
||||
import salt.exceptions
|
||||
import salt.log
|
||||
@@ -1920,7 +1904,7 @@ def os_data():
|
||||
)
|
||||
(osname, osrelease, oscodename) = \
|
||||
[x.strip('"').strip("'") for x in
|
||||
- linux_distribution(supported_dists=_supported_dists)]
|
||||
+ linux_distribution()]
|
||||
# Try to assign these three names based on the lsb info, they tend to
|
||||
# be more accurate than what python gets from /etc/DISTRO-release.
|
||||
# It's worth noting that Ubuntu has patched their Python distribution
|
||||
Loading…
x
Reference in New Issue
Block a user