diff options
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/conf_override.patch | 91 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_svn.bb | 3 |
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 @@ | |||
1 | From 45d0468f7f9e9be633b2819aa43ab9b6287b8e6a Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
3 | Date: Mon, 9 Jul 2012 11:01:15 +0100 | ||
4 | Subject: [PATCH] Do not read /etc/opkg/*.conf if -f is specified | ||
5 | |||
6 | If a configuration file is specified on the command line, we should | ||
7 | assume it contains all of the configuration and not try to read the | ||
8 | configuration in /etc/opkg. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-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 | |||
17 | diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c | ||
18 | index 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 | -- | ||
90 | 1.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 | ||
11 | S = "${WORKDIR}/trunk" | 12 | S = "${WORKDIR}/trunk" |
@@ -13,4 +14,4 @@ S = "${WORKDIR}/trunk" | |||
13 | SRCREV = "633" | 14 | SRCREV = "633" |
14 | PV = "0.1.8+svnr${SRCPV}" | 15 | PV = "0.1.8+svnr${SRCPV}" |
15 | 16 | ||
16 | PR = "${INC_PR}.0" | 17 | PR = "${INC_PR}.1" |