diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oe/package_manager.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 8b2b33106e..54a3c5e293 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
| @@ -946,13 +946,15 @@ class OpkgPM(OpkgDpkgPM): | |||
| 946 | self.d.getVar('FEED_DEPLOYDIR_BASE_URI'), | 946 | self.d.getVar('FEED_DEPLOYDIR_BASE_URI'), |
| 947 | arch)) | 947 | arch)) |
| 948 | 948 | ||
| 949 | if self.opkg_dir != '/var/lib/opkg': | 949 | if self.d.getVar('OPKGLIBDIR') != '/var/lib': |
| 950 | # There is no command line option for this anymore, we need to add | 950 | # There is no command line option for this anymore, we need to add |
| 951 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have | 951 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have |
| 952 | # the default value of "/var/lib" as defined in opkg: | 952 | # the default value of "/var/lib" as defined in opkg: |
| 953 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" | 953 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR VARDIR "/lib/opkg/lists" |
| 954 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" | 954 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR VARDIR "/lib/opkg/info" |
| 955 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status" | ||
| 955 | cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info')) | 956 | cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info')) |
| 957 | cfg_file.write("option lists_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists')) | ||
| 956 | cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status')) | 958 | cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status')) |
| 957 | 959 | ||
| 958 | 960 | ||
| @@ -971,13 +973,15 @@ class OpkgPM(OpkgDpkgPM): | |||
| 971 | config_file.write("src oe-%s file:%s\n" % | 973 | config_file.write("src oe-%s file:%s\n" % |
| 972 | (arch, pkgs_dir)) | 974 | (arch, pkgs_dir)) |
| 973 | 975 | ||
| 974 | if self.opkg_dir != '/var/lib/opkg': | 976 | if self.d.getVar('OPKGLIBDIR') != '/var/lib': |
| 975 | # There is no command line option for this anymore, we need to add | 977 | # There is no command line option for this anymore, we need to add |
| 976 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have | 978 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have |
| 977 | # the default value of "/var/lib" as defined in opkg: | 979 | # the default value of "/var/lib" as defined in opkg: |
| 978 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" | 980 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_LISTS_DIR VARDIR "/lib/opkg/lists" |
| 979 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" | 981 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR VARDIR "/lib/opkg/info" |
| 982 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE VARDIR "/lib/opkg/status" | ||
| 980 | config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info')) | 983 | config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'info')) |
| 984 | config_file.write("option lists_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'lists')) | ||
| 981 | config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status')) | 985 | config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR'), 'opkg', 'status')) |
| 982 | 986 | ||
| 983 | def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs): | 987 | def insert_feeds_uris(self, feed_uris, feed_base_paths, feed_archs): |
| @@ -1133,7 +1137,10 @@ class OpkgPM(OpkgDpkgPM): | |||
| 1133 | 1137 | ||
| 1134 | # Create an temp dir as opkg root for dummy installation | 1138 | # Create an temp dir as opkg root for dummy installation |
| 1135 | temp_rootfs = self.d.expand('${T}/opkg') | 1139 | temp_rootfs = self.d.expand('${T}/opkg') |
| 1136 | temp_opkg_dir = os.path.join(temp_rootfs, 'var/lib/opkg') | 1140 | opkg_lib_dir = self.d.getVar('OPKGLIBDIR', True) |
| 1141 | if opkg_lib_dir[0] == "/": | ||
| 1142 | opkg_lib_dir = opkg_lib_dir[1:] | ||
| 1143 | temp_opkg_dir = os.path.join(temp_rootfs, opkg_lib_dir, 'opkg') | ||
| 1137 | bb.utils.mkdirhier(temp_opkg_dir) | 1144 | bb.utils.mkdirhier(temp_opkg_dir) |
| 1138 | 1145 | ||
| 1139 | opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs) | 1146 | opkg_args = "-f %s -o %s " % (self.config_file, temp_rootfs) |
