[OE-core] [OE-Core][PATCH v2] LOCKED_KEEP is undefined, so the following error will be caught.

Bian Naimeng biannm at cn.fujitsu.com
Mon Nov 23 02:38:07 UTC 2015


 /usr/lib/python2.7/site-packages/smart/transaction.py", line 1230, in run
     locked[pkg] = (LOCKED_KEEP, None)

 NameError: global name 'LOCKED_KEEP' is not defined

Upstream-Status: Submitted [Smart at lists.labix.org]

Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
---
 .../python-smartpm/smart-define-LOCKED-KEEP.patch  | 45 ++++++++++++++++++++++
 meta/recipes-devtools/python/python-smartpm_git.bb |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-define-LOCKED-KEEP.patch

diff --git a/meta/recipes-devtools/python/python-smartpm/smart-define-LOCKED-KEEP.patch b/meta/recipes-devtools/python/python-smartpm/smart-define-LOCKED-KEEP.patch
new file mode 100644
index 0000000..8b7769a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-define-LOCKED-KEEP.patch
@@ -0,0 +1,45 @@
+From daaec43ecf3f0d0f89cef586327aa1063a4c44c6 Mon Sep 17 00:00:00 2001
+From: Bian Naimeng <biannm at cn.fujitsu.com>
+Date: Tue, 27 Oct 2015 11:08:52 +0900
+Subject: [PATCH] Fix a undefined error
+
+LOCKED_KEEP is undefined, so the following error will be caught.
+
+  /usr/lib/python2.7/site-packages/smart/transaction.py", line 1230, in run
+    locked[pkg] = (LOCKED_KEEP, None)
+
+  NameError: global name 'LOCKED_KEEP' is not defined
+
+Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
+---
+ smart/const.py       | 1 +
+ smart/transaction.py | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/smart/const.py b/smart/const.py
+index 3a01073..51ec6c1 100644
+--- a/smart/const.py
++++ b/smart/const.py
+@@ -77,5 +77,6 @@ LOCKED_CONFLICT    = Enum('LOCKED_CONFLICT')
+ LOCKED_CONFLICT_BY = Enum('LOCKED_CONFLICT_BY')
+ LOCKED_NO_COEXIST  = Enum('LOCKED_NO_COEXIST')
+ LOCKED_SYSCONF     = Enum('LOCKED_SYSCONF')
++LOCKED_KEEP        = Enum('LOCKED_KEEP')
+ 
+ # vim:ts=4:sw=4:et
+diff --git a/smart/transaction.py b/smart/transaction.py
+index f022aae..8600090 100644
+--- a/smart/transaction.py
++++ b/smart/transaction.py
+@@ -19,7 +19,7 @@
+ # along with Smart Package Manager; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ #
+-from smart.const import INSTALL, REMOVE, UPGRADE, FIX, REINSTALL, KEEP, LOCKED_EXCLUDE, LOCKED_INSTALL, LOCKED_CONFLICT, LOCKED_CONFLICT_BY, LOCKED_NO_COEXIST, LOCKED_SYSCONF, LOCKED_REMOVE
++from smart.const import INSTALL, REMOVE, UPGRADE, FIX, REINSTALL, KEEP, LOCKED_EXCLUDE, LOCKED_INSTALL, LOCKED_CONFLICT, LOCKED_CONFLICT_BY, LOCKED_NO_COEXIST, LOCKED_SYSCONF, LOCKED_REMOVE, LOCKED_KEEP
+ from smart.cache import PreRequires, Package
+ from smart import *
+ 
+-- 
+1.8.4.2
+
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
index d6c378b..9f8e9fe 100644
--- a/meta/recipes-devtools/python/python-smartpm_git.bb
+++ b/meta/recipes-devtools/python/python-smartpm_git.bb
@@ -24,6 +24,7 @@ SRC_URI = "\
           file://smart-already-installed-message.patch \
           file://smart-set-noprogress-for-pycurl.patch \
           file://smart-cache.py-getPackages-matches-name-version.patch \
+          file://smart-define-LOCKED-KEEP.patch \
          "
 
 SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"
-- 
1.9.1




More information about the Openembedded-core mailing list