summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oe/package_manager.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index a9d216a88e..13577b18bd 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1673,13 +1673,15 @@ class OpkgPM(OpkgDpkgPM):
1673 self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True), 1673 self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
1674 arch)) 1674 arch))
1675 1675
1676 if self.opkg_dir != '/var/lib/opkg': 1676 if self.d.getVar('OPKGLIBDIR', True) != '/var/lib':
1677 # There is no command line option for this anymore, we need to add 1677 # There is no command line option for this anymore, we need to add
1678 # info_dir and status_file to config file, if OPKGLIBDIR doesn't have 1678 # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
1679 # the default value of "/var/lib" as defined in opkg: 1679 # the default value of "/var/lib" as defined in opkg:
1680 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" 1680 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR VARDIR "/lib/opkg/lists"
1681 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" 1681 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR VARDIR "/lib/opkg/info"
1682 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
1682 cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) 1683 cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
1684 cfg_file.write("option lists_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'lists'))
1683 cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) 1685 cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
1684 1686
1685 1687
@@ -1698,13 +1700,15 @@ class OpkgPM(OpkgDpkgPM):
1698 config_file.write("src oe-%s file:%s\n" % 1700 config_file.write("src oe-%s file:%s\n" %
1699 (arch, pkgs_dir)) 1701 (arch, pkgs_dir))
1700 1702
1701 if self.opkg_dir != '/var/lib/opkg': 1703 if self.d.getVar('OPKGLIBDIR', True) != '/var/lib':
1702 # There is no command line option for this anymore, we need to add 1704 # There is no command line option for this anymore, we need to add
1703 # info_dir and status_file to config file, if OPKGLIBDIR doesn't have 1705 # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
1704 # the default value of "/var/lib" as defined in opkg: 1706 # the default value of "/var/lib" as defined in opkg:
1705 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" 1707 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR VARDIR "/lib/opkg/lists"
1706 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" 1708 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR VARDIR "/lib/opkg/info"
1709 # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status"
1707 config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) 1710 config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
1711 config_file.write("option lists_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'lists'))
1708 config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) 1712 config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
1709 1713
1710 def insert_feeds_uris(self): 1714 def insert_feeds_uris(self):
@@ -1860,7 +1864,10 @@ class OpkgPM(OpkgDpkgPM):
1860 1864
1861 # Create an temp dir as opkg root for dummy installation 1865 # Create an temp dir as opkg root for dummy installation
1862 temp_rootfs = self.d.expand('${T}/opkg') 1866 temp_rootfs = self.d.expand('${T}/opkg')
1863 temp_opkg_dir = os.path.join(temp_rootfs, 'var/lib/opkg') 1867 opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True)
1868 if opkg_lib_dir[0] == "/":
1869 opkg_lib_dir = opkg_lib_dir[1:]
1870 temp_opkg_dir = os.path.join(temp_rootfs, opkg_lib_dir, 'opkg')
1864 bb.utils.mkdirhier(temp_opkg_dir) 1871 bb.utils.mkdirhier(temp_opkg_dir)
1865 1872
1866 opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs) 1873 opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs)