summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-07-10 17:22:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-10 17:39:24 +0100
commit06348fe76474a20e0fc2f2938919f782c3e5ae28 (patch)
tree7e5684fc7cfd17d2d82e0216bd127af962c59f1b
parent029e3cea52f86438a1d6868020b8888b5c93d623 (diff)
downloadpoky-06348fe76474a20e0fc2f2938919f782c3e5ae28.tar.gz
opkg: fix installation of dev / dbg packages
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]. (From OE-Core rev: 37df134557802ba116f001597b7cd5e9bc39e188) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/opkg/opkg/conf_override.patch91
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb3
2 files changed, 93 insertions, 1 deletions
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 0000000000..b1698d8774
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/conf_override.patch
@@ -0,0 +1,91 @@
1From 45d0468f7f9e9be633b2819aa43ab9b6287b8e6a Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Mon, 9 Jul 2012 11:01:15 +0100
4Subject: [PATCH] Do not read /etc/opkg/*.conf if -f is specified
5
6If a configuration file is specified on the command line, we should
7assume it contains all of the configuration and not try to read the
8configuration in /etc/opkg.
9
10Upstream-Status: Pending
11
12Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
13---
14 libopkg/opkg_conf.c | 55 ++++++++++++++++++++++++++-------------------------
15 1 file changed, 28 insertions(+), 27 deletions(-)
16
17diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
18index 4711ce7..1e65bad 100644
19--- a/libopkg/opkg_conf.c
20+++ b/libopkg/opkg_conf.c
21@@ -473,39 +473,40 @@ opkg_conf_load(void)
22 &conf->pkg_src_list, &conf->dist_src_list))
23 goto err1;
24 }
25-
26- if (conf->offline_root)
27- sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf", conf->offline_root);
28 else {
29- const char *conf_file_dir = getenv("OPKG_CONF_DIR");
30- if (conf_file_dir == NULL)
31- conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
32- sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf", conf_file_dir);
33- }
34-
35- memset(&globbuf, 0, sizeof(globbuf));
36- glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
37- if (glob_ret && glob_ret != GLOB_NOMATCH) {
38- free(etc_opkg_conf_pattern);
39- globfree(&globbuf);
40- goto err1;
41- }
42-
43- free(etc_opkg_conf_pattern);
44+ if (conf->offline_root)
45+ sprintf_alloc(&etc_opkg_conf_pattern, "%s/etc/opkg/*.conf", conf->offline_root);
46+ else {
47+ const char *conf_file_dir = getenv("OPKG_CONF_DIR");
48+ if (conf_file_dir == NULL)
49+ conf_file_dir = OPKG_CONF_DEFAULT_CONF_FILE_DIR;
50+ sprintf_alloc(&etc_opkg_conf_pattern, "%s/*.conf", conf_file_dir);
51+ }
52
53- for (i = 0; i < globbuf.gl_pathc; i++) {
54- if (globbuf.gl_pathv[i])
55- if (conf->conf_file &&
56- !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
57- continue;
58- if ( opkg_conf_parse_file(globbuf.gl_pathv[i],
59- &conf->pkg_src_list, &conf->dist_src_list)<0) {
60+ memset(&globbuf, 0, sizeof(globbuf));
61+ glob_ret = glob(etc_opkg_conf_pattern, 0, glob_errfunc, &globbuf);
62+ if (glob_ret && glob_ret != GLOB_NOMATCH) {
63+ free(etc_opkg_conf_pattern);
64 globfree(&globbuf);
65 goto err1;
66 }
67- }
68
69- globfree(&globbuf);
70+ free(etc_opkg_conf_pattern);
71+
72+ for (i = 0; i < globbuf.gl_pathc; i++) {
73+ if (globbuf.gl_pathv[i])
74+ if (conf->conf_file &&
75+ !strcmp(conf->conf_file, globbuf.gl_pathv[i]))
76+ continue;
77+ if ( opkg_conf_parse_file(globbuf.gl_pathv[i],
78+ &conf->pkg_src_list, &conf->dist_src_list)<0) {
79+ globfree(&globbuf);
80+ goto err1;
81+ }
82+ }
83+
84+ globfree(&globbuf);
85+ }
86
87 if (conf->offline_root)
88 sprintf_alloc (&lock_file, "%s/%s", conf->offline_root, OPKGLOCKFILE);
89--
901.7.9.5
91
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index c07d393019..faf0ba388b 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 \
6 file://fix_installorder.patch \ 6 file://fix_installorder.patch \
7 file://offline_postinstall.patch\ 7 file://offline_postinstall.patch\
8 file://track_parents.patch \ 8 file://track_parents.patch \
9 file://conf_override.patch \
9" 10"
10 11
11S = "${WORKDIR}/trunk" 12S = "${WORKDIR}/trunk"
@@ -13,4 +14,4 @@ S = "${WORKDIR}/trunk"
13SRCREV = "633" 14SRCREV = "633"
14PV = "0.1.8+svnr${SRCPV}" 15PV = "0.1.8+svnr${SRCPV}"
15 16
16PR = "${INC_PR}.0" 17PR = "${INC_PR}.1"