* [PATCH 0/1] Fix dev/dbg installation for ipk backend
@ 2012-07-10 16:22 Paul Eggleton
2012-07-10 16:22 ` [PATCH 1/1] opkg: fix installation of dev / dbg packages Paul Eggleton
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2012-07-10 16:22 UTC (permalink / raw)
To: openembedded-core
I had intended to send this with a bunch of other commits for reworking
dev/dbg package installation, but that is taking longer than expected
so let's just get the fix for the ipk backend in first.
The following change since commit ddf52d0161096b089fad8f3ace69b6515d7b7226:
ccache: Ensure CCACHE_DIR is cleaned by do_clean task (2012-07-10 14:24:54 +0100)
is available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/bug-2595
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/bug-2595
Paul Eggleton (1):
opkg: fix installation of dev / dbg packages
.../recipes-devtools/opkg/opkg/conf_override.patch | 91 ++++++++++++++++++++
meta/recipes-devtools/opkg/opkg_svn.bb | 3 +-
2 files changed, 93 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/conf_override.patch
--
1.7.9.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] opkg: fix installation of dev / dbg packages
2012-07-10 16:22 [PATCH 0/1] Fix dev/dbg installation for ipk backend Paul Eggleton
@ 2012-07-10 16:22 ` Paul Eggleton
2012-07-10 18:02 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2012-07-10 16:22 UTC (permalink / raw)
To: openembedded-core
OE-Core revision ffe93e2a099e4cadb1829dc12a58a6d7bef9a5a7 moved opkg's
configuration file into /etc/opkg, and opkg always reads all files under
this directory even if -f is specified (as it is during do_rootfs in
order to specify our own generated config file), and this means that
after opkg-collateral is installed into the rootfs, this version of the
config is used, resulting in opkg ignoring the list of packages it has
already downloaded (since it now sees list_dir as /var/lib/opkg instead
of the default /var/lib/opkg/lists) and thus it fails to install any of
the "attemptonly" packages (including *-dev, *-dbg, etc.).
If we change the -f option to ignore configuration files in /etc/opkg
then we no longer have this problem.
Fixes [YOCTO #2595].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
.../recipes-devtools/opkg/opkg/conf_override.patch | 91 ++++++++++++++++++++
meta/recipes-devtools/opkg/opkg_svn.bb | 3 +-
2 files changed, 93 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/conf_override.patch
diff --git a/meta/recipes-devtools/opkg/opkg/conf_override.patch b/meta/recipes-devtools/opkg/opkg/conf_override.patch
new file mode 100644
index 0000000..b1698d8
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/conf_override.patch
@@ -0,0 +1,91 @@
+From 45d0468f7f9e9be633b2819aa43ab9b6287b8e6a Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Mon, 9 Jul 2012 11:01:15 +0100
+Subject: [PATCH] Do not read /etc/opkg/*.conf if -f is specified
+
+If a configuration file is specified on the command line, we should
+assume it contains all of the configuration and not try to read the
+configuration in /etc/opkg.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+---
+ libopkg/opkg_conf.c | 55 ++++++++++++++++++++++++++-------------------------
+ 1 file changed, 28 insertions(+), 27 deletions(-)
+
+diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
+index 4711ce7..1e65bad 100644
+--- a/libopkg/opkg_conf.c
++++ b/libopkg/opkg_conf.c
+@@ -473,39 +473,40 @@ opkg_conf_load(void)
+ &conf->pkg_src_list, &conf->dist_src_list))
+ goto err1;
+ }
+-
+- if (conf->offline_root)
+- sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf", conf->offline_root);
+ else {
+- const char *conf_file_dir = getenv("OPKG_CONF_DIR");
+- if (conf_file_dir == NULL)
+- conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
+- sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf", conf_file_dir);
+- }
+-
+- memset(&globbuf, 0, sizeof(globbuf));
+- glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
+- if (glob_ret && glob_ret != GLOB_NOMATCH) {
+- free(etc_opkg_conf_pattern);
+- globfree(&globbuf);
+- goto err1;
+- }
+-
+- free(etc_opkg_conf_pattern);
++ if (conf->offline_root)
++ sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf", conf->offline_root);
++ else {
++ const char *conf_file_dir = getenv("OPKG_CONF_DIR");
++ if (conf_file_dir == NULL)
++ conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
++ sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf", conf_file_dir);
++ }
+
+- for (i = 0; i < globbuf.gl_pathc; i++) {
+- if (globbuf.gl_pathv[i])
+- if (conf->conf_file &&
+- !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
+- continue;
+- if ( opkg_conf_parse_file(globbuf.gl_pathv[i],
+- &conf->pkg_src_list, &conf->dist_src_list)<0) {
++ memset(&globbuf, 0, sizeof(globbuf));
++ glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
++ if (glob_ret && glob_ret != GLOB_NOMATCH) {
++ free(etc_opkg_conf_pattern);
+ globfree(&globbuf);
+ goto err1;
+ }
+- }
+
+- globfree(&globbuf);
++ free(etc_opkg_conf_pattern);
++
++ for (i = 0; i < globbuf.gl_pathc; i++) {
++ if (globbuf.gl_pathv[i])
++ if (conf->conf_file &&
++ !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
++ continue;
++ if ( opkg_conf_parse_file(globbuf.gl_pathv[i],
++ &conf->pkg_src_list, &conf->dist_src_list)<0) {
++ globfree(&globbuf);
++ goto err1;
++ }
++ }
++
++ globfree(&globbuf);
++ }
+
+ if (conf->offline_root)
+ sprintf_alloc (&lock_file, "%s/%s", conf->offline_root, OPKGLOCKFILE);
+--
+1.7.9.5
+
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index c07d393..faf0ba3 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -6,6 +6,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
file://fix_installorder.patch \
file://offline_postinstall.patch\
file://track_parents.patch \
+ file://conf_override.patch \
"
S = "${WORKDIR}/trunk"
@@ -13,4 +14,4 @@ S = "${WORKDIR}/trunk"
SRCREV = "633"
PV = "0.1.8+svnr${SRCPV}"
-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] opkg: fix installation of dev / dbg packages
2012-07-10 16:22 ` [PATCH 1/1] opkg: fix installation of dev / dbg packages Paul Eggleton
@ 2012-07-10 18:02 ` Saul Wold
0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-07-10 18:02 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Paul Eggleton
On 07/10/2012 09:22 AM, Paul Eggleton wrote:
> OE-Core revision ffe93e2a099e4cadb1829dc12a58a6d7bef9a5a7 moved opkg's
> configuration file into /etc/opkg, and opkg always reads all files under
> this directory even if -f is specified (as it is during do_rootfs in
> order to specify our own generated config file), and this means that
> after opkg-collateral is installed into the rootfs, this version of the
> config is used, resulting in opkg ignoring the list of packages it has
> already downloaded (since it now sees list_dir as /var/lib/opkg instead
> of the default /var/lib/opkg/lists) and thus it fails to install any of
> the "attemptonly" packages (including *-dev, *-dbg, etc.).
>
> If we change the -f option to ignore configuration files in /etc/opkg
> then we no longer have this problem.
>
> Fixes [YOCTO #2595].
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> .../recipes-devtools/opkg/opkg/conf_override.patch | 91 ++++++++++++++++++++
> meta/recipes-devtools/opkg/opkg_svn.bb | 3 +-
> 2 files changed, 93 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-devtools/opkg/opkg/conf_override.patch
>
Merged into OE-Core
Thanks
Sau!
> diff --git a/meta/recipes-devtools/opkg/opkg/conf_override.patch b/meta/recipes-devtools/opkg/opkg/conf_override.patch
> new file mode 100644
> index 0000000..b1698d8
> --- /dev/null
> +++ b/meta/recipes-devtools/opkg/opkg/conf_override.patch
> @@ -0,0 +1,91 @@
> +From 45d0468f7f9e9be633b2819aa43ab9b6287b8e6a Mon Sep 17 00:00:00 2001
> +From: Paul Eggleton <paul.eggleton@linux.intel.com>
> +Date: Mon, 9 Jul 2012 11:01:15 +0100
> +Subject: [PATCH] Do not read /etc/opkg/*.conf if -f is specified
> +
> +If a configuration file is specified on the command line, we should
> +assume it contains all of the configuration and not try to read the
> +configuration in /etc/opkg.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> +---
> + libopkg/opkg_conf.c | 55 ++++++++++++++++++++++++++-------------------------
> + 1 file changed, 28 insertions(+), 27 deletions(-)
> +
> +diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
> +index 4711ce7..1e65bad 100644
> +--- a/libopkg/opkg_conf.c
> ++++ b/libopkg/opkg_conf.c
> +@@ -473,39 +473,40 @@ opkg_conf_load(void)
> + &conf->pkg_src_list, &conf->dist_src_list))
> + goto err1;
> + }
> +-
> +- if (conf->offline_root)
> +- sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf", conf->offline_root);
> + else {
> +- const char *conf_file_dir = getenv("OPKG_CONF_DIR");
> +- if (conf_file_dir == NULL)
> +- conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
> +- sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf", conf_file_dir);
> +- }
> +-
> +- memset(&globbuf, 0, sizeof(globbuf));
> +- glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
> +- if (glob_ret && glob_ret != GLOB_NOMATCH) {
> +- free(etc_opkg_conf_pattern);
> +- globfree(&globbuf);
> +- goto err1;
> +- }
> +-
> +- free(etc_opkg_conf_pattern);
> ++ if (conf->offline_root)
> ++ sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf", conf->offline_root);
> ++ else {
> ++ const char *conf_file_dir = getenv("OPKG_CONF_DIR");
> ++ if (conf_file_dir == NULL)
> ++ conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
> ++ sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf", conf_file_dir);
> ++ }
> +
> +- for (i = 0; i < globbuf.gl_pathc; i++) {
> +- if (globbuf.gl_pathv[i])
> +- if (conf->conf_file &&
> +- !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
> +- continue;
> +- if ( opkg_conf_parse_file(globbuf.gl_pathv[i],
> +- &conf->pkg_src_list, &conf->dist_src_list)<0) {
> ++ memset(&globbuf, 0, sizeof(globbuf));
> ++ glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
> ++ if (glob_ret && glob_ret != GLOB_NOMATCH) {
> ++ free(etc_opkg_conf_pattern);
> + globfree(&globbuf);
> + goto err1;
> + }
> +- }
> +
> +- globfree(&globbuf);
> ++ free(etc_opkg_conf_pattern);
> ++
> ++ for (i = 0; i < globbuf.gl_pathc; i++) {
> ++ if (globbuf.gl_pathv[i])
> ++ if (conf->conf_file &&
> ++ !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
> ++ continue;
> ++ if ( opkg_conf_parse_file(globbuf.gl_pathv[i],
> ++ &conf->pkg_src_list, &conf->dist_src_list)<0) {
> ++ globfree(&globbuf);
> ++ goto err1;
> ++ }
> ++ }
> ++
> ++ globfree(&globbuf);
> ++ }
> +
> + if (conf->offline_root)
> + sprintf_alloc (&lock_file, "%s/%s", conf->offline_root, OPKGLOCKFILE);
> +--
> +1.7.9.5
> +
> diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
> index c07d393..faf0ba3 100644
> --- a/meta/recipes-devtools/opkg/opkg_svn.bb
> +++ b/meta/recipes-devtools/opkg/opkg_svn.bb
> @@ -6,6 +6,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
> file://fix_installorder.patch \
> file://offline_postinstall.patch\
> file://track_parents.patch \
> + file://conf_override.patch \
> "
>
> S = "${WORKDIR}/trunk"
> @@ -13,4 +14,4 @@ S = "${WORKDIR}/trunk"
> SRCREV = "633"
> PV = "0.1.8+svnr${SRCPV}"
>
> -PR = "${INC_PR}.0"
> +PR = "${INC_PR}.1"
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-10 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 16:22 [PATCH 0/1] Fix dev/dbg installation for ipk backend Paul Eggleton
2012-07-10 16:22 ` [PATCH 1/1] opkg: fix installation of dev / dbg packages Paul Eggleton
2012-07-10 18:02 ` Saul Wold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.