diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2015-11-25 10:07:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-12 08:42:26 +0000 |
commit | 02c7b3f271c26971fd043aa5ee57ed5162539df2 (patch) | |
tree | beb530d93dc4a7dc11d0b0b664eabdbf30b06c7b | |
parent | 003c94f7d9adeaeb123e0a23201654978aa6c704 (diff) | |
download | poky-02c7b3f271c26971fd043aa5ee57ed5162539df2.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: 48a6d618d4b39058bf04a6cb0d8c076ae5da4013)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 964fddcda2..b9fa6d8791 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
@@ -1471,6 +1471,16 @@ class OpkgPM(PackageManager): | |||
1471 | self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True), | 1471 | self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True), |
1472 | arch)) | 1472 | arch)) |
1473 | 1473 | ||
1474 | if self.opkg_dir != '/var/lib/opkg': | ||
1475 | # There is no command line option for this anymore, we need to add | ||
1476 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have | ||
1477 | # the default value of "/var/lib" as defined in opkg: | ||
1478 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" | ||
1479 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" | ||
1480 | cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) | ||
1481 | cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) | ||
1482 | |||
1483 | |||
1474 | def _create_config(self): | 1484 | def _create_config(self): |
1475 | with open(self.config_file, "w+") as config_file: | 1485 | with open(self.config_file, "w+") as config_file: |
1476 | priority = 1 | 1486 | priority = 1 |
@@ -1486,6 +1496,15 @@ class OpkgPM(PackageManager): | |||
1486 | config_file.write("src oe-%s file:%s\n" % | 1496 | config_file.write("src oe-%s file:%s\n" % |
1487 | (arch, pkgs_dir)) | 1497 | (arch, pkgs_dir)) |
1488 | 1498 | ||
1499 | if self.opkg_dir != '/var/lib/opkg': | ||
1500 | # There is no command line option for this anymore, we need to add | ||
1501 | # info_dir and status_file to config file, if OPKGLIBDIR doesn't have | ||
1502 | # the default value of "/var/lib" as defined in opkg: | ||
1503 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info" | ||
1504 | # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status" | ||
1505 | config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info')) | ||
1506 | config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status')) | ||
1507 | |||
1489 | def insert_feeds_uris(self): | 1508 | def insert_feeds_uris(self): |
1490 | if self.feed_uris == "": | 1509 | if self.feed_uris == "": |
1491 | return | 1510 | return |