Browse Source

fix ipkg files output

Waldemar Brodkorb 14 years ago
parent
commit
1952ce4d79
2 changed files with 8 additions and 28 deletions
  1. 2 2
      package/busybox/Makefile
  2. 6 26
      package/busybox/patches/001-ipkg.patch

+ 2 - 2
package/busybox/Makefile

@@ -5,11 +5,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		busybox
 PKG_VERSION:=		1.16.1
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_MD5SUM:=		319486ec65078d07fde26eb620fecde7
 PKG_DESCR:=		Core utilities for embedded Linux systems
 PKG_SECTION:=		base
-PKG_URL:=		http://www.busybox.net
+PKG_URL:=		http://www.busybox.net/
 PKG_SITES:=		http://www.busybox.net/downloads/
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.bz2

+ 6 - 26
package/busybox/patches/001-ipkg.patch

@@ -1007,8 +1007,8 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/hash_table.h busybox-1.16.1/archi
 +#endif /* _HASH_TABLE_H_ */
 diff -Nur busybox-1.16.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.16.1/archival/libipkg/ipkg_cmd.c
 --- busybox-1.16.1.orig/archival/libipkg/ipkg_cmd.c	1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.16.1/archival/libipkg/ipkg_cmd.c	2010-06-29 17:31:22.355873403 +0200
-@@ -0,0 +1,1386 @@
++++ busybox-1.16.1/archival/libipkg/ipkg_cmd.c	2010-06-29 19:19:50.699618181 +0200
+@@ -0,0 +1,1366 @@
 +/* ipkg_cmd.c - the itsy package management system
 +
 +   Carl D. Worth
@@ -2023,30 +2023,10 @@ diff -Nur busybox-1.16.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.16.1/archiva
 +     installed_files = pkg_get_installed_files(pkg);
 +     pkg_version = pkg_version_str_alloc(pkg);
 +
-+     if (buff) {
-+     try_again:
-+	  used_len = snprintf(buff, buff_len, "Package %s (%s) is installed on %s and has the following files:\n",
-+			      pkg->name, pkg_version, pkg->dest->name) + 1;
-+	  if (used_len > buff_len) {
-+	       buff_len *= 2;
-+	       buff = realloc (buff, buff_len);
-+	       goto try_again;
-+	  }
-+	  for (iter = installed_files->head; iter; iter = iter->next) {
-+	       used_len += strlen (iter->data) + 1;
-+	       while (buff_len <= used_len) {
-+		    buff_len *= 2;
-+		    buff = realloc (buff, buff_len);
-+	       }
-+	       strncat(buff, iter->data, buff_len);
-+	       strncat(buff, "\n", buff_len);
-+	  } 
-+	  if (ipkg_cb_list) ipkg_cb_list(pkg->name,
-+					 buff,
-+					 pkg_version_str_alloc(pkg),
-+					 pkg->state_status,
-+					 p_userdata);
-+	  free(buff);
++     printf("Package %s (%s) is installed on %s and has the following files:\n",
++            pkg->name, pkg_version, pkg->dest->name);
++     for (iter = installed_files->head; iter; iter = iter->next) {
++          puts(iter->data);
 +     }
 +
 +     free(pkg_version);