diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2015-11-25 22:33:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-01 21:32:02 +0000 |
commit | 312862f12ad7e0ba3a6edd32e5e821e3277b7c53 (patch) | |
tree | 5d41c25ec676c1caef23d7a5c1436179f00d6f74 /meta | |
parent | b00f73429a025da09fba3285a7006db83e74c727 (diff) | |
download | poky-312862f12ad7e0ba3a6edd32e5e821e3277b7c53.tar.gz |
package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
* without this the do_rootfs task doesn't respect OPKGLIBDIR and
info, status are created in different directory than opkg on
target expects
* people who modify OPKGLIBDIR need to make sure that opkg.conf included
in opkg package also sets info_dir and status_file options
(From OE-Core rev: 11f1956cf5d732cfed6d28c8c292b5053966895c)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/package_manager.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index bc334736a4..d6104b3843 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -1472,6 +1472,16 @@ class OpkgPM(PackageManager): | |||
1472 | self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True), | 1472 | self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True), |
1473 | arch)) | 1473 | arch)) |
1474 | 1474 | ||
1475 | if self.opkg_dir != '/var/lib/opkg': | ||
1476 | # There is no command line option for this anymore, we need to add | ||
1477 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have | ||
1478 | # the default value of "/var/lib" as defined in opkg: | ||
1479 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" | ||
1480 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" | ||
1481 | cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) | ||
1482 | cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) | ||
1483 | |||
1484 | |||
1475 | def _create_config(self): | 1485 | def _create_config(self): |
1476 | with open(self.config_file, "w+") as config_file: | 1486 | with open(self.config_file, "w+") as config_file: |
1477 | priority = 1 | 1487 | priority = 1 |
@@ -1487,6 +1497,15 @@ class OpkgPM(PackageManager): | |||
1487 | config_file.write("src oe-%s file:%s\n" % | 1497 | config_file.write("src oe-%s file:%s\n" % |
1488 | (arch, pkgs_dir)) | 1498 | (arch, pkgs_dir)) |
1489 | 1499 | ||
1500 | if self.opkg_dir != '/var/lib/opkg': | ||
1501 | # There is no command line option for this anymore, we need to add | ||
1502 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have | ||
1503 | # the default value of "/var/lib" as defined in opkg: | ||
1504 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" | ||
1505 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" | ||
1506 | config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) | ||
1507 | config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) | ||
1508 | |||
1490 | def insert_feeds_uris(self): | 1509 | def insert_feeds_uris(self): |
1491 | if self.feed_uris == "": | 1510 | if self.feed_uris == "": |
1492 | return | 1511 | return |