summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2016-02-05 12:51:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-06 23:10:45 +0000
commitbbdbe00c2a0c1b07f1dfd8a33a6afe8f764571c3 (patch)
tree0611df0e0b4bba2f6033a442a1dcb68f428a4a6c /meta/lib/oe
parentea40a0b7690b2a6cdda5dfd067e0abee1f19bf6d (diff)
downloadpoky-bbdbe00c2a0c1b07f1dfd8a33a6afe8f764571c3.tar.gz
package_manager.py: fix python indentation bug (opkg)
This if branch is causing the following error during do_rootfs: "Exception: UnboundLocalError: local variable 'cfg_file' referenced before assignment". This happends because the cfg_file variable is defined at a deeper nesting level (just above the if branch). (From OE-Core rev: 555981c10e6b7f5c2be7f2c3fefb89b1add72cab) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/package_manager.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 5776952523..26f6466ed1 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1507,14 +1507,14 @@ class OpkgPM(PackageManager):
1507 self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True), 1507 self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
1508 arch)) 1508 arch))
1509 1509
1510 if self.opkg_dir != '/var/lib/opkg': 1510 if self.opkg_dir != '/var/lib/opkg':
1511 # There is no command line option for this anymore, we need to add 1511 # There is no command line option for this anymore, we need to add
1512 # info_dir and status_file to config file, if OPKGLIBDIR doesn't have 1512 # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
1513 # the default value of "/var/lib" as defined in opkg: 1513 # the default value of "/var/lib" as defined in opkg:
1514 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" 1514 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
1515 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" 1515 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
1516 cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) 1516 cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
1517 cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) 1517 cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
1518 1518
1519 1519
1520 def _create_config(self): 1520 def _create_config(self):