* [PATCH][master][jethro] package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
@ 2015-11-25 9:08 Martin Jansa
2015-11-25 21:23 ` Martin Jansa
0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2015-11-25 9:08 UTC (permalink / raw)
To: openembedded-core
* 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
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/lib/oe/package_manager.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 964fddc..7b71174 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1471,6 +1471,16 @@ class OpkgPM(PackageManager):
self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
arch))
+ if self.opkg_dir != '/var/lib/opkg':
+ # There is no command line option for this anymore, we need to add
+ # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+ # the default value of "/var/lib" as defined in opkg:
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
+ cfg_file.write("option info_dir %s\n" % os.path.join(self.opkg_dir, 'info'))
+ cfg_file.write("option status_file %s\n" % os.path.join(self.opkg_dir, 'status'))
+
+
def _create_config(self):
with open(self.config_file, "w+") as config_file:
priority = 1
@@ -1486,6 +1496,15 @@ class OpkgPM(PackageManager):
config_file.write("src oe-%s file:%s\n" %
(arch, pkgs_dir))
+ if self.opkg_dir != '/var/lib/opkg':
+ # There is no command line option for this anymore, we need to add
+ # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+ # the default value of "/var/lib" as defined in opkg:
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
+ config_file.write("option info_dir %s\n" % os.path.join(self.opkg_dir, 'info'))
+ config_file.write("option status_file %s\n" % os.path.join(self.opkg_dir, 'status'))
+
def insert_feeds_uris(self):
if self.feed_uris == "":
return
--
2.6.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][master][jethro] package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
2015-11-25 9:08 [PATCH][master][jethro] package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default Martin Jansa
@ 2015-11-25 21:23 ` Martin Jansa
2015-11-25 21:33 ` [PATCHv2][master][jethro] " Martin Jansa
0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2015-11-25 21:23 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]
On Wed, Nov 25, 2015 at 10:08:43AM +0100, Martin Jansa wrote:
> * 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
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> meta/lib/oe/package_manager.py | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
> index 964fddc..7b71174 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -1471,6 +1471,16 @@ class OpkgPM(PackageManager):
> self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
> arch))
>
> + if self.opkg_dir != '/var/lib/opkg':
> + # There is no command line option for this anymore, we need to add
> + # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
> + # the default value of "/var/lib" as defined in opkg:
> + # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
> + # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
> + cfg_file.write("option info_dir %s\n" % os.path.join(self.opkg_dir, 'info'))
> + cfg_file.write("option status_file %s\n" % os.path.join(self.opkg_dir, 'status'))
This is older revision than what I was testing, v2 coming soon
(self.opkg_dir isn't good, because it is absolute path).
> +
> +
> def _create_config(self):
> with open(self.config_file, "w+") as config_file:
> priority = 1
> @@ -1486,6 +1496,15 @@ class OpkgPM(PackageManager):
> config_file.write("src oe-%s file:%s\n" %
> (arch, pkgs_dir))
>
> + if self.opkg_dir != '/var/lib/opkg':
> + # There is no command line option for this anymore, we need to add
> + # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
> + # the default value of "/var/lib" as defined in opkg:
> + # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
> + # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
> + config_file.write("option info_dir %s\n" % os.path.join(self.opkg_dir, 'info'))
> + config_file.write("option status_file %s\n" % os.path.join(self.opkg_dir, 'status'))
> +
> def insert_feeds_uris(self):
> if self.feed_uris == "":
> return
> --
> 2.6.3
>
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCHv2][master][jethro] package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
2015-11-25 21:23 ` Martin Jansa
@ 2015-11-25 21:33 ` Martin Jansa
0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2015-11-25 21:33 UTC (permalink / raw)
To: openembedded-core
* 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
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/lib/oe/package_manager.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 964fddc..b9fa6d8 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -1471,6 +1471,16 @@ class OpkgPM(PackageManager):
self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
arch))
+ if self.opkg_dir != '/var/lib/opkg':
+ # There is no command line option for this anymore, we need to add
+ # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+ # the default value of "/var/lib" as defined in opkg:
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
+ cfg_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
+ cfg_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
+
+
def _create_config(self):
with open(self.config_file, "w+") as config_file:
priority = 1
@@ -1486,6 +1496,15 @@ class OpkgPM(PackageManager):
config_file.write("src oe-%s file:%s\n" %
(arch, pkgs_dir))
+ if self.opkg_dir != '/var/lib/opkg':
+ # There is no command line option for this anymore, we need to add
+ # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+ # the default value of "/var/lib" as defined in opkg:
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR "/var/lib/opkg/info"
+ # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE "/var/lib/opkg/status"
+ config_file.write("option info_dir %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
+ config_file.write("option status_file %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
+
def insert_feeds_uris(self):
if self.feed_uris == "":
return
--
2.6.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-25 21:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 9:08 [PATCH][master][jethro] package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default Martin Jansa
2015-11-25 21:23 ` Martin Jansa
2015-11-25 21:33 ` [PATCHv2][master][jethro] " Martin Jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox