summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"