[oe-commits] [openembedded-core] 11/17: dnf: fix python3 syntax warning

git at git.openembedded.org git at git.openembedded.org
Thu Mar 5 16:32:58 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit eea77ff3b10c477a5091a69ac7d8a5ea8209b293
Author: Joe Slater <joe.slater at windriver.com>
AuthorDate: Wed Mar 4 16:30:20 2020 -0800

    dnf: fix python3 syntax warning
    
    Backport from dnf version 4.2.7.
    
    Signed-off-by: Joe Slater <joe.slater at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../dnf/dnf/Fix-SyntaxWarning.patch                | 34 ++++++++++++++++++++++
 meta/recipes-devtools/dnf/dnf_4.2.2.bb             |  1 +
 2 files changed, 35 insertions(+)

diff --git a/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch b/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch
new file mode 100644
index 0000000..1bd8b09
--- /dev/null
+++ b/meta/recipes-devtools/dnf/dnf/Fix-SyntaxWarning.patch
@@ -0,0 +1,34 @@
+From 23c5b15efe42e5e6ee695e54798bac248532d8d6 Mon Sep 17 00:00:00 2001
+
+Date: Tue, 28 May 2019 13:14:51 +0200
+Subject: [oe-core][PATCH 1/1] Fix SyntaxWarning: "is" with a literal. Did you
+ mean "=="?
+
+---
+ dnf/cli/commands/repoquery.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+---
+
+Unchanged.  Appears in version 4.2.7.
+
+Upstream-Status: Backport [git://github.com/rpm-software-management/dnf.git]
+
+Signed-off-by: Joe Slater <joe.slater at windriver.com>
+
+
+diff --git a/dnf/cli/commands/repoquery.py b/dnf/cli/commands/repoquery.py
+index 941a470..63fc668 100644
+--- a/dnf/cli/commands/repoquery.py
++++ b/dnf/cli/commands/repoquery.py
+@@ -611,7 +611,7 @@ class RepoQueryCommand(commands.Command):
+ 
+     def tree_seed(self, query, aquery, opts, level=-1, usedpkgs=None):
+         for pkg in sorted(set(query.run()), key=lambda p: p.name):
+-            usedpkgs = set() if usedpkgs is None or level is -1 else usedpkgs
++            usedpkgs = set() if usedpkgs is None or level == -1 else usedpkgs
+             if pkg.name.startswith("rpmlib") or pkg.name.startswith("solvable"):
+                 return
+             self.grow_tree(level, pkg, opts)
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/dnf/dnf_4.2.2.bb b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
index f6e616e..5244e10 100644
--- a/meta/recipes-devtools/dnf/dnf_4.2.2.bb
+++ b/meta/recipes-devtools/dnf/dnf_4.2.2.bb
@@ -13,6 +13,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://Fix-SyntaxWarning.patch \
            "
 
 SRCREV = "9947306a55271b8b7c9e2b6e3b7d582885b6045d"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list