All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dnf: backport a patch to fix execution under Python 3.7
@ 2018-11-15 12:49 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2018-11-15 12:49 UTC (permalink / raw)
  To: openembedded-core

Python 3.7 removed the os.errno import, so fix dnf to use the correct import.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/dnf/dnf/errno.patch | 36 +++++++++++++++++++++++++++++++
 meta/recipes-devtools/dnf/dnf_2.7.5.bb    |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/dnf/dnf/errno.patch

diff --git a/meta/recipes-devtools/dnf/dnf/errno.patch b/meta/recipes-devtools/dnf/dnf/errno.patch
new file mode 100644
index 00000000000..76a1690b765
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/errno.patch
@@ -0,0 +1,36 @@
+Don't use os.errno as that should never have existed, and doesn't exist with
+Python 3.7.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 199fc9cb11ff004fc752b58b7177aaf8d7fcedfd Mon Sep 17 00:00:00 2001
+From: Neal Gompa <ngompa13@gmail.com>
+Date: Sat, 3 Mar 2018 12:44:54 -0500
+Subject: [PATCH] util: Correctly source errno.EEXIST
+
+---
+ dnf/util.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dnf/util.py b/dnf/util.py
+index ab7fd279c..d0f1a4f25 100644
+--- a/dnf/util.py
++++ b/dnf/util.py
+@@ -28,6 +28,7 @@
+ import dnf
+ import dnf.const
+ import dnf.pycomp
++import errno
+ import itertools
+ import librepo
+ import locale
+@@ -120,7 +121,7 @@ def ensure_dir(dname):
+     try:
+         os.makedirs(dname, mode=0o755)
+     except OSError as e:
+-        if e.errno != os.errno.EEXIST or not os.path.isdir(dname):
++        if e.errno != errno.EEXIST or not os.path.isdir(dname):
+             raise e
+ 
+ def empty(iterable):
\ No newline at end of file
diff --git a/meta/recipes-devtools/dnf/dnf_2.7.5.bb b/meta/recipes-devtools/dnf/dnf_2.7.5.bb
index df60d731b69..e2754fbb932 100644
--- a/meta/recipes-devtools/dnf/dnf_2.7.5.bb
+++ b/meta/recipes-devtools/dnf/dnf_2.7.5.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://github.com/rpm-software-management/dnf.git \
            file://0005-Do-not-prepend-installroot-to-logdir.patch \
            file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
            file://0030-Run-python-scripts-using-env.patch \
+           file://errno.patch \
            "
 
 SRCREV = "564c44667c7014843fa6f1732621093114ec59b2"
-- 
2.11.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-15 12:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 12:49 [PATCH] dnf: backport a patch to fix execution under Python 3.7 Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.