summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-11-28 16:45:05 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-11-28 16:45:05 +0000
commit91225da5b854cc0b6416041b47762841eb53b606 (patch)
tree5dab4c338db0f03502cbf15f77b56ad6344a5fd2
parent705bfa44d80d291b3342a4acb5e6441af06acf0c (diff)
downloadpoky-91225da5b854cc0b6416041b47762841eb53b606.tar.gz
ipkg: fix "unable to create /usr/lib/ipkg/lists directory" bug
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3264 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/ipkg/files/ipkg_bugfix.patch44
-rw-r--r--meta/packages/ipkg/ipkg-native_0.99.154.bb2
-rw-r--r--meta/packages/ipkg/ipkg.inc3
-rw-r--r--meta/packages/ipkg/ipkg_0.99.154.bb2
4 files changed, 48 insertions, 3 deletions
diff --git a/meta/packages/ipkg/files/ipkg_bugfix.patch b/meta/packages/ipkg/files/ipkg_bugfix.patch
new file mode 100644
index 0000000000..51eccbb2bd
--- /dev/null
+++ b/meta/packages/ipkg/files/ipkg_bugfix.patch
@@ -0,0 +1,44 @@
1Index: C/ipkg_conf.c
2===================================================================
3--- C.orig/ipkg_conf.c 2005-06-21 13:59:32.000000000 +0000
4+++ C/ipkg_conf.c 2007-11-27 01:11:17.000000000 +0000
5@@ -423,6 +423,7 @@
6 nv_pair_t *nv_pair;
7 pkg_dest_t *dest;
8 char *root_dir;
9+ char *list_dir2;
10
11 for (iter = nv_pair_list->head; iter; iter = iter->next) {
12 nv_pair = iter->data;
13@@ -432,8 +433,14 @@
14 } else {
15 root_dir = strdup(nv_pair->value);
16 }
17- dest = pkg_dest_list_append(&conf->pkg_dest_list, nv_pair->name, root_dir, lists_dir);
18+ if (conf->offline_root) {
19+ sprintf_alloc(&list_dir2, "%s%s", conf->offline_root, lists_dir);
20+ } else {
21+ list_dir2 = strdup(lists_dir);
22+ }
23+ dest = pkg_dest_list_append(&conf->pkg_dest_list, nv_pair->name, root_dir, list_dir2);
24 free(root_dir);
25+ free(list_dir2);
26 if (dest == NULL) {
27 continue;
28 }
29@@ -562,13 +569,13 @@
30 } else if (strcmp(type, "dest") == 0) {
31 nv_pair_list_append(tmp_dest_nv_pair_list, name, value);
32 } else if (strcmp(type, "lists_dir") == 0) {
33- *lists_dir = realloc(*lists_dir,strlen(value)+1);
34+ *lists_dir = realloc(*lists_dir,strlen(name)+1);
35 if (*lists_dir == NULL) {
36 ipkg_message(conf, IPKG_ERROR, "ERROR: Not enough memory\n");
37 free(options);
38 return EINVAL;
39 }
40- sprintf (*lists_dir,"%s",value);
41+ sprintf (*lists_dir,"%s", name);
42 } else if (strcmp(type, "arch") == 0) {
43 ipkg_message(conf, IPKG_INFO, "supported arch %s priority (%s)\n", name, value);
44 if (!value) {
diff --git a/meta/packages/ipkg/ipkg-native_0.99.154.bb b/meta/packages/ipkg/ipkg-native_0.99.154.bb
index 20ec07a631..9e5185fe24 100644
--- a/meta/packages/ipkg/ipkg-native_0.99.154.bb
+++ b/meta/packages/ipkg/ipkg-native_0.99.154.bb
@@ -1,4 +1,4 @@
1require ipkg.inc 1require ipkg.inc
2require ipkg-native.inc 2require ipkg-native.inc
3 3
4PR = "r1" 4PR = "r2"
diff --git a/meta/packages/ipkg/ipkg.inc b/meta/packages/ipkg/ipkg.inc
index 8965a0f458..c3195c8c57 100644
--- a/meta/packages/ipkg/ipkg.inc
+++ b/meta/packages/ipkg/ipkg.inc
@@ -11,7 +11,8 @@ AUTO_LIBNAME_PKGS = "libipkg"
11 11
12SRC_URI = "${HANDHELDS_CVS};module=familiar/dist/ipkg;tag=${@'V' + bb.data.getVar('PV',d,1).replace('.', '-')} \ 12SRC_URI = "${HANDHELDS_CVS};module=familiar/dist/ipkg;tag=${@'V' + bb.data.getVar('PV',d,1).replace('.', '-')} \
13 file://fix_tar_extension.patch;patch=1 \ 13 file://fix_tar_extension.patch;patch=1 \
14 file://terse.patch;patch=1 \ 14 file://terse.patch;patch=1 \
15 file://ipkg_bugfix.patch;patch=1 \
15 file://noupdalt.patch;patch=1" 16 file://noupdalt.patch;patch=1"
16 17
17S = "${WORKDIR}/ipkg/C" 18S = "${WORKDIR}/ipkg/C"
diff --git a/meta/packages/ipkg/ipkg_0.99.154.bb b/meta/packages/ipkg/ipkg_0.99.154.bb
index 8f4e4aaaf6..27992c3efa 100644
--- a/meta/packages/ipkg/ipkg_0.99.154.bb
+++ b/meta/packages/ipkg/ipkg_0.99.154.bb
@@ -1,4 +1,4 @@
1require ipkg.inc 1require ipkg.inc
2PR = "r8" 2PR = "r9"
3 3
4RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_update-alternatives}" 4RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_update-alternatives}"