[oe-commits] org.oe.dev ipkg-native: Fix the infamous ' cannot create /usr/lib/ipkg' warning (from poky)

rpurdie commit openembedded-commits at lists.openembedded.org
Sat Dec 1 23:30:52 UTC 2007


ipkg-native: Fix the infamous ' cannot create /usr/lib/ipkg' warning (from poky)

Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 9784df253c04df1dfcc620c6bf064869215598f6
ViewMTN: http://monotone.openembedded.org/revision/info/9784df253c04df1dfcc620c6bf064869215598f6
Files:
1
packages/ipkg/files/ipkg_bugfix.patch
packages/ipkg/ipkg-native_0.99.163.bb
Diffs:

#
# mt diff -r6c1337973bc5aed97ea409ce18f9d9f9de4a94c7 -r9784df253c04df1dfcc620c6bf064869215598f6
#
# 
# 
# add_file "packages/ipkg/files/ipkg_bugfix.patch"
#  content [7196e094a6eea0772015cde5f3c119ebec352085]
# 
# patch "packages/ipkg/ipkg-native_0.99.163.bb"
#  from [87ca1449de6ccb2e78e19bcbabdaf6368070902b]
#    to [254630516ad5b6def75021ad9bb723fd5e62382f]
# 
============================================================
--- packages/ipkg/files/ipkg_bugfix.patch	7196e094a6eea0772015cde5f3c119ebec352085
+++ packages/ipkg/files/ipkg_bugfix.patch	7196e094a6eea0772015cde5f3c119ebec352085
@@ -0,0 +1,44 @@
+Index: C/ipkg_conf.c
+===================================================================
+--- C.orig/ipkg_conf.c	2005-06-21 13:59:32.000000000 +0000
++++ C/ipkg_conf.c	2007-11-27 01:11:17.000000000 +0000
+@@ -423,6 +423,7 @@
+      nv_pair_t *nv_pair;
+      pkg_dest_t *dest;
+      char *root_dir;
++     char *list_dir2;
+ 
+      for (iter = nv_pair_list->head; iter; iter = iter->next) {
+ 	  nv_pair = iter->data;
+@@ -432,8 +433,14 @@
+ 	  } else {
+ 	       root_dir = strdup(nv_pair->value);
+ 	  }
+-	  dest = pkg_dest_list_append(&conf->pkg_dest_list, nv_pair->name, root_dir, lists_dir);
++	  if (conf->offline_root) {
++	       sprintf_alloc(&list_dir2, "%s%s", conf->offline_root, lists_dir);
++	  } else {
++	       list_dir2 = strdup(lists_dir);
++	  }
++	  dest = pkg_dest_list_append(&conf->pkg_dest_list, nv_pair->name, root_dir, list_dir2);
+ 	  free(root_dir);
++	  free(list_dir2);
+ 	  if (dest == NULL) {
+ 	       continue;
+ 	  }
+@@ -562,13 +569,13 @@
+ 	  } else if (strcmp(type, "dest") == 0) {
+ 	       nv_pair_list_append(tmp_dest_nv_pair_list, name, value);
+ 	  } else if (strcmp(type, "lists_dir") == 0) {
+-	       *lists_dir = realloc(*lists_dir,strlen(value)+1);
++	       *lists_dir = realloc(*lists_dir,strlen(name)+1);
+                if (*lists_dir == NULL) {
+ 		    ipkg_message(conf, IPKG_ERROR, "ERROR: Not enough memory\n");
+ 	            free(options);
+ 	            return EINVAL;
+                }
+-               sprintf (*lists_dir,"%s",value);
++               sprintf (*lists_dir,"%s", name);
+ 	  } else if (strcmp(type, "arch") == 0) {
+ 	       ipkg_message(conf, IPKG_INFO, "supported arch %s priority (%s)\n", name, value);
+ 	       if (!value) {
============================================================
--- packages/ipkg/ipkg-native_0.99.163.bb	87ca1449de6ccb2e78e19bcbabdaf6368070902b
+++ packages/ipkg/ipkg-native_0.99.163.bb	254630516ad5b6def75021ad9bb723fd5e62382f
@@ -1,8 +1,8 @@ require ipkg-native.inc
 S = "${WORKDIR}/ipkg-${PV}"
 
 #require ipkg_${PV}.bb
 require ipkg-native.inc
-PR = "r2"
+PR = "r3"
 
 inherit autotools pkgconfig native
 
@@ -10,5 +10,6 @@ SRC_URI = "http://www.handhelds.org/pub/
            file://is-processing.patch;patch=1 \
            file://1-pkg-parse--Optimize-inefficient-parsing.patch;patch=1 \
            file://2-pkg-vec--Optimize-gross-inefficiency.patch;patch=1 \
+           file://ipkg_bugfix.patch;patch=1 \
           "
 






More information about the Openembedded-commits mailing list