Patchwork [1/6] lib/oe/package_manager.py: Fix _pkg_translate_smart_to_oe function

login
register
mail settings
Submitter Mark Hatle
Date July 1, 2014, 8:01 p.m.
Message ID <2304283af395d567930b1ac61fc36ecc201405ee.1404244287.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/74551/
State Accepted
Commit 2c59db63189352914a1bf2d02263f33cc9f81b4b
Headers show

Comments

Mark Hatle - July 1, 2014, 8:01 p.m.
File: '/home/mhatle/git/oss/oe-core/meta/lib/oe/package_manager.py', lineno: 278, function: _pkg_translate_smart_to_oe
     0274:
     0275:            if found == 1 and fixed_arch == fixed_cmp_arch:
     0276:                break
     0277:        #bb.note('%s, %s -> %s, %s' % (pkg, arch, new_pkg, new_arch))
 *** 0278:        return new_pkg, new_arch
     0279:
     0280:    def _list_pkg_deps(self):
     0281:        cmd = [bb.utils.which(os.getenv('PATH'), "rpmresolve"),
     0282:               "-t", self.image_rpmlib]
Exception: UnboundLocalError: local variable 'new_arch' referenced before assignment

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/lib/oe/package_manager.py | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 18eb792..5444422 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -248,6 +248,7 @@  class RpmPkgsList(PkgsList):
     '''
     def _pkg_translate_smart_to_oe(self, pkg, arch):
         new_pkg = pkg
+        new_arch = arch
         fixed_arch = arch.replace('_', '-')
         found = 0
         for mlib in self.ml_prefix_list: