summaryrefslogtreecommitdiff
path: root/package/busybox/patches/001-ipkg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/busybox/patches/001-ipkg.patch')
-rw-r--r--package/busybox/patches/001-ipkg.patch1494
1 files changed, 698 insertions, 796 deletions
diff --git a/package/busybox/patches/001-ipkg.patch b/package/busybox/patches/001-ipkg.patch
index ca7059acc..8beac29b7 100644
--- a/package/busybox/patches/001-ipkg.patch
+++ b/package/busybox/patches/001-ipkg.patch
@@ -1,20 +1,9 @@
-diff -Nur busybox-1.13.4.orig/Makefile busybox-1.13.4/Makefile
---- busybox-1.13.4.orig/Makefile 2009-04-15 02:11:01.000000000 +0200
-+++ busybox-1.13.4/Makefile 2009-05-31 15:40:37.158023800 +0200
-@@ -444,6 +444,7 @@
-
- libs-y := \
- archival/ \
-+ archival/libipkg/ \
- archival/libunarchive/ \
- console-tools/ \
- coreutils/ \
-diff -Nur busybox-1.13.4.orig/archival/Config.in busybox-1.13.4/archival/Config.in
---- busybox-1.13.4.orig/archival/Config.in 2008-11-09 18:28:02.000000000 +0100
-+++ busybox-1.13.4/archival/Config.in 2009-05-31 15:40:36.993689729 +0200
-@@ -158,6 +158,14 @@
- gzip is used to compress files.
- It's probably the most widely used UNIX compression program.
+diff -Nur busybox-1.15.2.orig/archival/Config.in busybox-1.15.2/archival/Config.in
+--- busybox-1.15.2.orig/archival/Config.in 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2/archival/Config.in 2010-03-14 20:53:41.000000000 +0100
+@@ -180,6 +180,14 @@
+ are actually slower than gzip at equivalent compression ratios
+ and take up 3.2K of code.
+config IPKG
+ bool "ipkg"
@@ -27,21 +16,10 @@ diff -Nur busybox-1.13.4.orig/archival/Config.in busybox-1.13.4/archival/Config.
config RPM2CPIO
bool "rpm2cpio"
default n
-diff -Nur busybox-1.13.4.orig/archival/Kbuild busybox-1.13.4/archival/Kbuild
---- busybox-1.13.4.orig/archival/Kbuild 2008-11-09 18:28:02.000000000 +0100
-+++ busybox-1.13.4/archival/Kbuild 2009-05-31 15:40:36.997989438 +0200
-@@ -16,6 +16,7 @@
- lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
- lib-$(CONFIG_GUNZIP) += bbunzip.o
- lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
-+lib-$(CONFIG_IPKG) += ipkg.o
- lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
- lib-$(CONFIG_RPM) += rpm.o
- lib-$(CONFIG_TAR) += tar.o
-diff -Nur busybox-1.13.4.orig/archival/dpkg.c busybox-1.13.4/archival/dpkg.c
---- busybox-1.13.4.orig/archival/dpkg.c 2008-11-09 18:28:02.000000000 +0100
-+++ busybox-1.13.4/archival/dpkg.c 2009-05-31 15:40:36.993689729 +0200
-@@ -1485,16 +1485,7 @@
+diff -Nur busybox-1.15.2.orig/archival/dpkg.c busybox-1.15.2/archival/dpkg.c
+--- busybox-1.15.2.orig/archival/dpkg.c 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2/archival/dpkg.c 2010-03-14 20:53:41.000000000 +0100
+@@ -1481,16 +1481,7 @@
return ar_handle->sub_archive->buffer;
}
@@ -59,9 +37,9 @@ diff -Nur busybox-1.13.4.orig/archival/dpkg.c busybox-1.13.4/archival/dpkg.c
static void unpack_package(deb_file_t *deb_file)
{
-diff -Nur busybox-1.13.4.orig/archival/ipkg.c busybox-1.13.4/archival/ipkg.c
---- busybox-1.13.4.orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/ipkg.c 2009-05-31 15:40:36.993689729 +0200
+diff -Nur busybox-1.15.2.orig/archival/ipkg.c busybox-1.15.2/archival/ipkg.c
+--- busybox-1.15.2.orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/ipkg.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,28 @@
+/* ipkg.c - the itsy package management system
+
@@ -91,73 +69,20 @@ diff -Nur busybox-1.13.4.orig/archival/ipkg.c busybox-1.13.4/archival/ipkg.c
+{
+ return ipkg_op(argc, argv);
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/Kbuild busybox-1.13.4/archival/libipkg/Kbuild
---- busybox-1.13.4.orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/Kbuild 2009-05-31 15:40:37.069994700 +0200
-@@ -0,0 +1,60 @@
-+# Makefile for busybox
-+#
-+# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
-+# Copyright (C) 2006 OpenWrt.org
-+#
-+# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
-+
-+LIBIPKG_CORE_OBJS:= \
-+ args.o \
-+ libipkg.o \
-+ user.o \
-+
-+LIBIPKG_CMD_OBJS:= \
-+ ipkg_cmd.o \
-+ ipkg_configure.o \
-+ ipkg_download.o \
-+ ipkg_install.o \
-+ ipkg_remove.o \
-+ ipkg_upgrade.o \
-+
-+LIBIPKG_DB_OBJS:= \
-+ hash_table.o \
-+ ipkg_conf.o \
-+ ipkg_utils.o \
-+ pkg.o \
-+ pkg_depends.o \
-+ pkg_extract.o \
-+ pkg_hash.o \
-+ pkg_parse.o \
-+ pkg_vec.o \
-+
-+LIBIPKG_LIST_OBJS:= \
-+ conffile.o \
-+ conffile_list.o \
-+ nv_pair.o \
-+ nv_pair_list.o \
-+ pkg_dest.o \
-+ pkg_dest_list.o \
-+ pkg_src.o \
-+ pkg_src_list.o \
-+ str_list.o \
-+ void_list.o \
-+
-+LIBIPKG_UTIL_OBJS:= \
-+ file_util.o \
-+ ipkg_message.o \
-+ str_util.o \
-+ xsystem.o \
-+
-+lib-y :=
-+lib-$(CONFIG_IPKG) += $(LIBIPKG_CORE_OBJS)
-+lib-$(CONFIG_IPKG) += $(LIBIPKG_CMD_OBJS)
-+lib-$(CONFIG_IPKG) += $(LIBIPKG_DB_OBJS)
-+lib-$(CONFIG_IPKG) += $(LIBIPKG_LIST_OBJS)
-+lib-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_OBJS)
-+
-+ifeq ($(strip $(IPKG_ARCH)),)
-+IPKG_ARCH:=$(TARGET_ARCH)
-+endif
-+CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
-diff -Nur busybox-1.13.4.orig/archival/libipkg/args.c busybox-1.13.4/archival/libipkg/args.c
---- busybox-1.13.4.orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/args.c 2009-05-31 15:40:36.997989438 +0200
+diff -Nur busybox-1.15.2.orig/archival/Kbuild busybox-1.15.2/archival/Kbuild
+--- busybox-1.15.2.orig/archival/Kbuild 2009-09-26 15:14:56.000000000 +0200
++++ busybox-1.15.2/archival/Kbuild 2010-03-14 20:53:41.000000000 +0100
+@@ -16,6 +16,7 @@
+ lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
+ lib-$(CONFIG_GUNZIP) += bbunzip.o
+ lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
++lib-$(CONFIG_IPKG) += ipkg.o
+ lib-$(CONFIG_LZOP) += lzop.o lzo1x_1.o lzo1x_1o.o lzo1x_d.o bbunzip.o
+ lib-$(CONFIG_LZOP_COMPR_HIGH) += lzo1x_9x.o
+ lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
+diff -Nur busybox-1.15.2.orig/archival/libipkg/args.c busybox-1.15.2/archival/libipkg/args.c
+--- busybox-1.15.2.orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/args.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,242 @@
+/* args.c - parse command-line args
+
@@ -401,9 +326,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/args.c busybox-1.13.4/archival/li
+{
+ bb_error_msg("version %s\n", IPKG_VERSION);
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/args.h busybox-1.13.4/archival/libipkg/args.h
---- busybox-1.13.4.orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/args.h 2009-05-31 15:40:36.997989438 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/args.h busybox-1.15.2/archival/libipkg/args.h
+--- busybox-1.15.2.orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/args.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,72 @@
+/* args.h - parse command-line args
+
@@ -477,9 +402,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/args.h busybox-1.13.4/archival/li
+void args_usage(const char *complaint);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile.c busybox-1.13.4/archival/libipkg/conffile.c
---- busybox-1.13.4.orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/conffile.c 2009-05-31 15:40:36.997989438 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/conffile.c busybox-1.15.2/archival/libipkg/conffile.c
+--- busybox-1.15.2.orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/conffile.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,65 @@
+/* conffile.c - the itsy package management system
+
@@ -546,9 +471,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile.c busybox-1.13.4/archiva
+
+ return ret;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile.h busybox-1.13.4/archival/libipkg/conffile.h
---- busybox-1.13.4.orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/conffile.h 2009-05-31 15:40:36.997989438 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/conffile.h busybox-1.15.2/archival/libipkg/conffile.h
+--- busybox-1.15.2.orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/conffile.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,30 @@
+/* conffile.h - the itsy package management system
+
@@ -580,9 +505,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile.h busybox-1.13.4/archiva
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile_list.c busybox-1.13.4/archival/libipkg/conffile_list.c
---- busybox-1.13.4.orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/conffile_list.c 2009-05-31 15:40:37.001989668 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/conffile_list.c busybox-1.15.2/archival/libipkg/conffile_list.c
+--- busybox-1.15.2.orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/conffile_list.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,47 @@
+/* conffile_list.c - the itsy package management system
+
@@ -631,9 +556,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile_list.c busybox-1.13.4/ar
+ return nv_pair_list_pop(list);
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile_list.h busybox-1.13.4/archival/libipkg/conffile_list.h
---- busybox-1.13.4.orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/conffile_list.h 2009-05-31 15:40:37.005990736 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/conffile_list.h busybox-1.15.2/archival/libipkg/conffile_list.h
+--- busybox-1.15.2.orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/conffile_list.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,36 @@
+/* conffile_list.h - the itsy package management system
+
@@ -671,10 +596,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/conffile_list.h busybox-1.13.4/ar
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/file_util.c busybox-1.13.4/archival/libipkg/file_util.c
---- busybox-1.13.4.orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/file_util.c 2009-05-31 15:40:37.005990736 +0200
-@@ -0,0 +1,132 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/file_util.c busybox-1.15.2/archival/libipkg/file_util.c
+--- busybox-1.15.2.orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/file_util.c 2010-03-14 20:53:41.000000000 +0100
+@@ -0,0 +1,186 @@
+/* file_util.c - convenience routines for common stat operations
+
+ Carl D. Worth
@@ -802,14 +727,68 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/file_util.c busybox-1.13.4/archiv
+ return bb_make_directory(path, mode, FILEUTILS_RECUR);
+}
+
++static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
++ unsigned hash_length)
++{
++ /* xzalloc zero-terminates */
++ char *hex_value = xzalloc((hash_length * 2) + 1);
++ bin2hex(hex_value, (char*)hash_value, hash_length);
++ return (unsigned char *)hex_value;
++}
++
++static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
++{
++ int src_fd, hash_len, count;
++ union _ctx_ {
++ sha1_ctx_t sha1;
++ md5_ctx_t md5;
++ } context;
++ uint8_t *hash_value = NULL;
++ RESERVE_CONFIG_UBUFFER(in_buf, 4096);
++ void FAST_FUNC (*update)(const void*, size_t, void*);
++ void FAST_FUNC (*final)(void*, void*);
++
++ src_fd = open_or_warn_stdin(filename);
++ if (src_fd < 0) {
++ return NULL;
++ }
++
++ /* figure specific hash algorithims */
++ if (ENABLE_MD5SUM && hash_algo == HASH_MD5) {
++ md5_begin(&context.md5);
++ update = (void*)md5_hash;
++ final = (void*)md5_end;
++ hash_len = 16;
++ } else {
++ bb_error_msg_and_die("algorithm not supported");
++ }
++
++ while (0 < (count = safe_read(src_fd, in_buf, 4096))) {
++ update(in_buf, count, &context);
++ }
++
++ if (count == 0) {
++ final(in_buf, &context);
++ hash_value = hash_bin_to_hex(in_buf, hash_len);
++ }
++
++ RELEASE_CONFIG_BUFFER(in_buf);
++
++ if (src_fd != STDIN_FILENO) {
++ close(src_fd);
++ }
++
++ return hash_value;
++}
++
+uint8_t *file_md5sum_alloc(const char *file_name)
+{
+ return hash_file(file_name, HASH_MD5);
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/file_util.h busybox-1.13.4/archival/libipkg/file_util.h
---- busybox-1.13.4.orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/file_util.h 2009-05-31 15:40:37.005990736 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/file_util.h busybox-1.15.2/archival/libipkg/file_util.h
+--- busybox-1.15.2.orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/file_util.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,29 @@
+/* file_util.h - convenience routines for common file operations
+
@@ -840,9 +819,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/file_util.h busybox-1.13.4/archiv
+uint8_t *file_md5sum_alloc(const char *file_name);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/hash_table.c busybox-1.13.4/archival/libipkg/hash_table.c
---- busybox-1.13.4.orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/hash_table.c 2009-05-31 15:40:37.005990736 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/hash_table.c busybox-1.15.2/archival/libipkg/hash_table.c
+--- busybox-1.15.2.orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/hash_table.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,155 @@
+/* hash.c - hash tables for ipkg
+
@@ -999,9 +978,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/hash_table.c busybox-1.13.4/archi
+ }
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/hash_table.h busybox-1.13.4/archival/libipkg/hash_table.h
---- busybox-1.13.4.orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/hash_table.h 2009-05-31 15:40:37.005990736 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/hash_table.h busybox-1.15.2/archival/libipkg/hash_table.h
+--- busybox-1.15.2.orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/hash_table.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,44 @@
+/* hash.h - hash tables for ipkg
+
@@ -1047,80 +1026,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/hash_table.h busybox-1.13.4/archi
+void hash_table_foreach(hash_table_t *hash, void (*f)(const char *key, void *entry, void *data), void *data);
+
+#endif /* _HASH_TABLE_H_ */
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg.h busybox-1.13.4/archival/libipkg/ipkg.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg.h 2009-05-31 15:40:37.037992297 +0200
-@@ -0,0 +1,66 @@
-+/* ipkg.h - the itsy package management system
-+
-+ Carl D. Worth
-+
-+ Copyright (C) 2001 University of Southern California
-+
-+ This program is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU General Public License as
-+ published by the Free Software Foundation; either version 2, or (at
-+ your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+*/
-+
-+#ifndef IPKG_H
-+#define IPKG_H
-+
-+#include "libbb.h"
-+
-+#include "ipkg_includes.h"
-+#include "ipkg_conf.h"
-+#include "ipkg_message.h"
-+
-+#define IPKG_PKG_EXTENSION ".ipk"
-+#define DPKG_PKG_EXTENSION ".deb"
-+
-+#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"
-+#define IPKG_PKG_VERSION_SEP_CHAR '_'
-+
-+#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg"
-+#define IPKG_LISTS_DIR_SUFFIX "lists"
-+#define IPKG_INFO_DIR_SUFFIX "info"
-+#define IPKG_STATUS_FILE_SUFFIX "status"
-+
-+#define IPKG_BACKUP_SUFFIX "-ipkg.backup"
-+
-+#define IPKG_LIST_DESCRIPTION_LENGTH 128
-+
-+#define IPKG_VERSION "1.00"
-+
-+
-+enum ipkg_error {
-+ IPKG_SUCCESS = 0,
-+ IPKG_PKG_DEPS_UNSATISFIED,
-+ IPKG_PKG_IS_ESSENTIAL,
-+ IPKG_PKG_HAS_DEPENDENTS,
-+ IPKG_PKG_HAS_NO_CANDIDATE
-+};
-+typedef enum ipkg_error ipkg_error_t;
-+
-+extern int ipkg_state_changed;
-+
-+
-+struct errlist {
-+ char * errmsg;
-+ struct errlist * next;
-+} ;
-+
-+extern struct errlist* error_list;
-+
-+extern ipkg_conf_t *global_conf;
-+
-+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archival/libipkg/ipkg_cmd.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_cmd.c 2009-05-31 15:40:37.013991196 +0200
-@@ -0,0 +1,1433 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_cmd.c busybox-1.15.2/archival/libipkg/ipkg_cmd.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_cmd.c 2010-03-14 20:57:14.000000000 +0100
+@@ -0,0 +1,1386 @@
+/* ipkg_cmd.c - the itsy package management system
+
+ Carl D. Worth
@@ -1172,10 +1081,8 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+#include "ipkg_configure.h"
+#include "ipkg_message.h"
+
-+#ifdef IPKG_LIB
+#include "libipkg.h"
+static void *p_userdata = NULL;
-+#endif
+
+static int ipkg_update_cmd(ipkg_conf_t *conf);
+static int ipkg_upgrade_cmd(ipkg_conf_t *conf, int argc, char **argv);
@@ -1268,7 +1175,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ return NULL;
+}
+
-+#ifdef IPKG_LIB
+int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv, void *userdata)
+{
+ int result;
@@ -1299,12 +1205,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ p_userdata = NULL;
+ return result;
+}
-+#else
-+int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv)
-+{
-+ return (cmd->fun)(conf, argc, argv);
-+}
-+#endif
+
+static int ipkg_update_cmd(ipkg_conf_t *conf)
+{
@@ -1767,9 +1667,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ if (newline) {
+ *newline = '\0';
+ }
-+#ifndef IPKG_LIB
-+ printf("%s - %s\n", pkg->name, desc_short);
-+#else
+ if (ipkg_cb_list) {
+ version_str = pkg_version_str_alloc(pkg);
+ ipkg_cb_list(pkg->name,desc_short,
@@ -1778,7 +1675,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ p_userdata);
+ free(version_str);
+ }
-+#endif
+ }
+ pkg_vec_free(available);
+
@@ -1816,9 +1712,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ if (newline) {
+ *newline = '\0';
+ }
-+#ifndef IPKG_LIB
-+ printf("%s - %s\n", pkg->name, desc_short);
-+#else
+ if (ipkg_cb_list) {
+ version_str = pkg_version_str_alloc(pkg);
+ ipkg_cb_list(pkg->name,desc_short,
@@ -1827,7 +1720,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ p_userdata);
+ free(version_str);
+ }
-+#endif
+ }
+
+ return 0;
@@ -1861,28 +1753,14 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ if (pkg_name && fnmatch(pkg_name, pkg->name, 0)) {
+ continue;
+ }
-+#ifndef IPKG_LIB
-+ if (n_fields) {
-+ for (j = 0; j < n_fields; j++)
-+ pkg_print_field(pkg, stdout, pkg_fields[j]);
-+ } else {
-+ pkg_print_info(pkg, stdout);
-+ }
-+#else
-+
+ buff = pkg_formatted_info(pkg);
+ if ( buff ) {
+ if (ipkg_cb_status) ipkg_cb_status(pkg->name,
+ pkg->state_status,
+ buff,
+ p_userdata);
-+/*
-+ We should not forget that actually the pointer is allocated.
-+ We need to free it :) ( Thanks florian for seeing the error )
-+*/
+ free(buff);
+ }
-+#endif
+ if (conf->verbosity > 1) {
+ conffile_list_elt_t *iter;
+ for (iter = pkg->conffiles.head; iter; iter = iter->next) {
@@ -1893,10 +1771,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ }
+ }
+ }
-+#ifndef IPKG_LIB
-+ if (buff)
-+ free(buff);
-+#endif
+ pkg_vec_free(available);
+
+ return 0;
@@ -2170,13 +2044,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ installed_files = pkg_get_installed_files(pkg);
+ pkg_version = pkg_version_str_alloc(pkg);
+
-+#ifndef IPKG_LIB
-+ 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);
-+ }
-+#else
+ if (buff) {
+ try_again:
+ used_len = snprintf(buff, buff_len, "Package %s (%s) is installed on %s and has the following files:\n",
@@ -2202,7 +2069,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ p_userdata);
+ free(buff);
+ }
-+#endif
+
+ free(pkg_version);
+ pkg_free_installed_files(pkg);
@@ -2496,14 +2362,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+ for (iter = installed_files->head; iter; iter = iter->next) {
+ installed_file = iter->data;
+ if (fnmatch(argv[0], installed_file, 0)==0) {
-+#ifndef IPKG_LIB
-+ printf("%s: %s\n", pkg->name, installed_file);
-+#else
+ if (ipkg_cb_list) ipkg_cb_list(pkg->name,
+ installed_file,
+ pkg_version_str_alloc(pkg),
+ pkg->state_status, p_userdata);
-+#endif
+ }
+ }
+
@@ -2554,10 +2416,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.c busybox-1.13.4/archiva
+}
+
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.h busybox-1.13.4/archival/libipkg/ipkg_cmd.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_cmd.h 2009-05-31 15:40:37.021990539 +0200
-@@ -0,0 +1,46 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_cmd.h busybox-1.15.2/archival/libipkg/ipkg_cmd.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_cmd.h 2010-03-14 21:06:29.000000000 +0100
+@@ -0,0 +1,41 @@
+/* ipkg_cmd.h - the itsy package management system
+
+ Carl D. Worth
@@ -2589,24 +2451,19 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_cmd.h busybox-1.13.4/archiva
+typedef struct ipkg_cmd ipkg_cmd_t;
+
+ipkg_cmd_t *ipkg_cmd_find(const char *name);
-+#ifdef IPKG_LIB
+int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc,
+ const char **argv, void *userdata);
-+#else
-+int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv);
-+#endif
+int ipkg_multiple_files_scan (ipkg_conf_t *conf, int argc, char *argv[]);
+/* install any packges with state_want == SW_INSTALL */
+int ipkg_install_wanted_packages(ipkg_conf_t *conf);
+/* ensure that all dependences are satisfied */
+int ipkg_configure_packages(ipkg_conf_t *conf, char *pkg_name);
-+
+int pkg_mark_provides(pkg_t *pkg);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_conf.c busybox-1.13.4/archival/libipkg/ipkg_conf.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_conf.c 2009-05-31 15:40:37.021990539 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_conf.c busybox-1.15.2/archival/libipkg/ipkg_conf.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_conf.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,711 @@
+/* ipkg_conf.c - the itsy package management system
+
@@ -3319,9 +3176,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_conf.c busybox-1.13.4/archiv
+ sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename);
+ return root_filename;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_conf.h busybox-1.13.4/archival/libipkg/ipkg_conf.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_conf.h 2009-05-31 15:40:37.025991328 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_conf.h busybox-1.15.2/archival/libipkg/ipkg_conf.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_conf.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,107 @@
+/* ipkg_conf.h - the itsy package management system
+
@@ -3430,9 +3287,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_conf.h busybox-1.13.4/archiv
+char *root_filename_alloc(ipkg_conf_t *conf, char *filename);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_configure.c busybox-1.13.4/archival/libipkg/ipkg_configure.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_configure.c 2009-05-31 15:40:37.025991328 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_configure.c busybox-1.15.2/archival/libipkg/ipkg_configure.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_configure.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,40 @@
+/* ipkg_configure.c - the itsy package management system
+
@@ -3474,9 +3331,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_configure.c busybox-1.13.4/a
+ return 0;
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_configure.h busybox-1.13.4/archival/libipkg/ipkg_configure.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_configure.h 2009-05-31 15:40:37.025991328 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_configure.h busybox-1.15.2/archival/libipkg/ipkg_configure.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_configure.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,25 @@
+/* ipkg_configure.h - the itsy package management system
+
@@ -3503,9 +3360,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_configure.h busybox-1.13.4/a
+int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_download.c busybox-1.13.4/archival/libipkg/ipkg_download.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_download.c 2009-05-31 15:42:41.497770134 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_download.c busybox-1.15.2/archival/libipkg/ipkg_download.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_download.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,195 @@
+/* ipkg_download.c - the itsy package management system
+
@@ -3702,9 +3559,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_download.c busybox-1.13.4/ar
+ }
+ return 0;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_download.h busybox-1.13.4/archival/libipkg/ipkg_download.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_download.h 2009-05-31 15:40:37.033992625 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_download.h busybox-1.15.2/archival/libipkg/ipkg_download.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_download.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,30 @@
+/* ipkg_download.h - the itsy package management system
+
@@ -3736,9 +3593,81 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_download.h busybox-1.13.4/ar
+int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_includes.h busybox-1.13.4/archival/libipkg/ipkg_includes.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_includes.h 2009-05-31 15:40:37.041993644 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg.h busybox-1.15.2/archival/libipkg/ipkg.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg.h 2010-03-14 20:53:41.000000000 +0100
+@@ -0,0 +1,68 @@
++/* ipkg.h - the itsy package management system
++
++ Carl D. Worth
++
++ Copyright (C) 2001 University of Southern California
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License as
++ published by the Free Software Foundation; either version 2, or (at
++ your option) any later version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++*/
++
++#ifndef IPKG_H
++#define IPKG_H
++
++#include "libbb.h"
++
++#include "ipkg_includes.h"
++#include "ipkg_conf.h"
++#include "ipkg_message.h"
++
++#define IPKG_PKG_EXTENSION ".ipk"
++#define DPKG_PKG_EXTENSION ".deb"
++
++#define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"
++#define IPKG_PKG_VERSION_SEP_CHAR '_'
++
++#define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg"
++#define IPKG_LISTS_DIR_SUFFIX "lists"
++#define IPKG_INFO_DIR_SUFFIX "info"
++#define IPKG_STATUS_FILE_SUFFIX "status"
++
++#define IPKG_BACKUP_SUFFIX "-ipkg.backup"
++
++#define IPKG_LIST_DESCRIPTION_LENGTH 128
++
++#define IPKG_VERSION "1.00"
++
++
++enum ipkg_error {
++ IPKG_SUCCESS = 0,
++ IPKG_PKG_DEPS_UNSATISFIED,
++ IPKG_PKG_IS_ESSENTIAL,
++ IPKG_PKG_HAS_DEPENDENTS,
++ IPKG_PKG_HAS_NO_CANDIDATE
++};
++typedef enum ipkg_error ipkg_error_t;
++
++extern int ipkg_state_changed;
++
++
++struct errlist {
++ char * errmsg;
++ struct errlist * next;
++} ;
++
++extern struct errlist* error_list;
++
++extern ipkg_conf_t *global_conf;
++
++typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t;
++
++#endif
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_includes.h busybox-1.15.2/archival/libipkg/ipkg_includes.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_includes.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,79 @@
+#ifndef IPKG_INCLUDES_H
+#define IPKG_INCLUDES_H
@@ -3819,9 +3748,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_includes.h busybox-1.13.4/ar
+#endif
+
+#endif /* IPKG_INCLUDES_H */
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_install.c busybox-1.13.4/archival/libipkg/ipkg_install.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_install.c 2009-05-31 15:40:37.045994712 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_install.c busybox-1.15.2/archival/libipkg/ipkg_install.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_install.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,1982 @@
+/* ipkg_install.c - the itsy package management system
+
@@ -5805,9 +5734,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_install.c busybox-1.13.4/arc
+}
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_install.h busybox-1.13.4/archival/libipkg/ipkg_install.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_install.h 2009-05-31 15:40:37.049992428 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_install.h busybox-1.15.2/archival/libipkg/ipkg_install.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_install.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,35 @@
+/* ipkg_install.h - the itsy package management system
+
@@ -5844,10 +5773,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_install.h busybox-1.13.4/arc
+int name_mark_dependencies_for_installation(ipkg_conf_t *conf, const char *pkg_name, pkg_vec_t *pkgs_needed);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_message.c busybox-1.13.4/archival/libipkg/ipkg_message.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_message.c 2009-05-31 15:40:37.053992938 +0200
-@@ -0,0 +1,61 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_message.c busybox-1.15.2/archival/libipkg/ipkg_message.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_message.c 2010-03-14 20:57:51.000000000 +0100
+@@ -0,0 +1,35 @@
+/* ipkg_message.c - the itsy package management system
+
+ Copyright (C) 2003 Daniele Nicolodi <daniele@grinta.net>
@@ -5867,33 +5796,8 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_message.c busybox-1.13.4/arc
+#include "ipkg.h"
+#include "ipkg_conf.h"
+#include "ipkg_message.h"
-+
-+#ifndef IPKG_LIB
-+
-+void
-+ipkg_message (ipkg_conf_t * conf, message_level_t level, char *fmt, ...)
-+{
-+ va_list ap;
-+
-+ if (conf && (conf->verbosity < level))
-+ {
-+ return;
-+ }
-+ else
-+ {
-+
-+ va_start (ap, fmt);
-+ vprintf (fmt, ap);
-+ va_end (ap);
-+ }
-+}
-+
-+#else
-+
+#include "libipkg.h"
+
-+//#define ipkg_message(conf, level, fmt, arg...) ipkg_cb_message(conf, level, fmt, ## arg)
-+
+void
+ipkg_message (ipkg_conf_t * conf, message_level_t level, const char *fmt, ...)
+{
@@ -5908,10 +5812,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_message.c busybox-1.13.4/arc
+ ipkg_cb_message(conf,level,ts);
+ }
+}
-+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_message.h busybox-1.13.4/archival/libipkg/ipkg_message.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_message.h 2009-05-31 15:40:37.057994007 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_message.h busybox-1.15.2/archival/libipkg/ipkg_message.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_message.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,32 @@
+/* ipkg_message.h - the itsy package management system
+
@@ -5945,9 +5848,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_message.h busybox-1.13.4/arc
+extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, const char *fmt, ...);
+
+#endif /* _IPKG_MESSAGE_H_ */
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_remove.c busybox-1.13.4/archival/libipkg/ipkg_remove.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_remove.c 2009-05-31 15:40:37.061994238 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_remove.c busybox-1.15.2/archival/libipkg/ipkg_remove.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_remove.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,385 @@
+/* ipkg_remove.c - the itsy package management system
+
@@ -6334,9 +6237,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_remove.c busybox-1.13.4/arch
+
+ return 0;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_remove.h busybox-1.13.4/archival/libipkg/ipkg_remove.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_remove.h 2009-05-31 15:40:37.061994238 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_remove.h busybox-1.15.2/archival/libipkg/ipkg_remove.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_remove.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,33 @@
+/* ipkg_remove.h - the itsy package management system
+
@@ -6371,9 +6274,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_remove.h busybox-1.13.4/arch
+
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_upgrade.c busybox-1.13.4/archival/libipkg/ipkg_upgrade.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_upgrade.c 2009-05-31 15:40:37.061994238 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_upgrade.c busybox-1.15.2/archival/libipkg/ipkg_upgrade.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_upgrade.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,79 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6454,9 +6357,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_upgrade.c busybox-1.13.4/arc
+ new->state_flag |= SF_USER;
+ return ipkg_install_pkg(conf, new,1);
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_upgrade.h busybox-1.13.4/archival/libipkg/ipkg_upgrade.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_upgrade.h 2009-05-31 15:40:37.061994238 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_upgrade.h busybox-1.15.2/archival/libipkg/ipkg_upgrade.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_upgrade.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,18 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6476,9 +6379,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_upgrade.h busybox-1.13.4/arc
+#include "ipkg.h"
+
+int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old);
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_utils.c busybox-1.13.4/archival/libipkg/ipkg_utils.c
---- busybox-1.13.4.orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_utils.c 2009-05-31 15:40:37.065994189 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_utils.c busybox-1.15.2/archival/libipkg/ipkg_utils.c
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_utils.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,185 @@
+/* ipkg_utils.c - the itsy package management system
+
@@ -6665,9 +6568,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_utils.c busybox-1.13.4/archi
+}
+
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_utils.h busybox-1.13.4/archival/libipkg/ipkg_utils.h
---- busybox-1.13.4.orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/ipkg_utils.h 2009-05-31 15:40:37.065994189 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/ipkg_utils.h busybox-1.15.2/archival/libipkg/ipkg_utils.h
+--- busybox-1.15.2.orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/ipkg_utils.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,29 @@
+/* ipkg_utils.h - the itsy package management system
+
@@ -6698,10 +6601,74 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/ipkg_utils.h busybox-1.13.4/archi
+int line_is_blank(const char *line);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.c busybox-1.13.4/archival/libipkg/libipkg.c
---- busybox-1.13.4.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/libipkg.c 2009-05-31 15:40:37.069994700 +0200
-@@ -0,0 +1,532 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/Kbuild busybox-1.15.2/archival/libipkg/Kbuild
+--- busybox-1.15.2.orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/Kbuild 2010-03-14 21:01:18.000000000 +0100
+@@ -0,0 +1,60 @@
++# Makefile for busybox
++#
++# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
++# Copyright (C) 2006 OpenWrt.org
++#
++# Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
++
++LIBIPKG_CORE_OBJS:= \
++ args.o \
++ libipkg.o \
++ user.o \
++
++LIBIPKG_CMD_OBJS:= \
++ ipkg_cmd.o \
++ ipkg_configure.o \
++ ipkg_download.o \
++ ipkg_install.o \
++ ipkg_remove.o \
++ ipkg_upgrade.o \
++
++LIBIPKG_DB_OBJS:= \
++ hash_table.o \
++ ipkg_conf.o \
++ ipkg_utils.o \
++ pkg.o \
++ pkg_depends.o \
++ pkg_extract.o \
++ pkg_hash.o \
++ pkg_parse.o \
++ pkg_vec.o \
++
++LIBIPKG_LIST_OBJS:= \
++ conffile.o \
++ conffile_list.o \
++ nv_pair.o \
++ nv_pair_list.o \
++ pkg_dest.o \
++ pkg_dest_list.o \
++ pkg_src.o \
++ pkg_src_list.o \
++ str_list.o \
++ void_list.o \
++
++LIBIPKG_UTIL_OBJS:= \
++ file_util.o \
++ ipkg_message.o \
++ str_util.o \
++ xsystem.o \
++
++lib-y :=
++lib-$(CONFIG_IPKG) += $(LIBIPKG_CORE_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_CMD_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_DB_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_LIST_OBJS)
++lib-$(CONFIG_IPKG) += $(LIBIPKG_UTIL_OBJS)
++
++ifeq ($(strip $(IPKG_ARCH)),)
++IPKG_ARCH:=$(TARGET_ARCH)
++endif
++CFLAGS += -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
+diff -Nur busybox-1.15.2.orig/archival/libipkg/libipkg.c busybox-1.15.2/archival/libipkg/libipkg.c
+--- busybox-1.15.2.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/libipkg.c 2010-03-14 20:59:05.000000000 +0100
+@@ -0,0 +1,525 @@
+/* ipkglib.c - the itsy package management system
+
+ Florina Boor
@@ -6719,8 +6686,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.c busybox-1.13.4/archival
+ General Public License for more details.
+*/
+
-+#ifdef IPKG_LIB
-+
+#include "ipkg.h"
+#include "ipkg_includes.h"
+#include "libipkg.h"
@@ -7105,12 +7070,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.c busybox-1.13.4/archival
+ if (conf && (conf->verbosity < level)) {
+ return 0;
+ } else {
-+#ifdef IPKG_LIB
-+ if ( level == IPKG_ERROR ){
++ if ( level == IPKG_ERROR )
+ push_error_list(&error_list, msg);
-+// printf(msg);
-+ } else
-+#endif
++ else
+ printf(msg);
+ }
+ return 0;
@@ -7232,12 +7194,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.c busybox-1.13.4/archival
+
+ return err;
+}
-+
-+#endif /* IPKG_LIB */
-diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.h busybox-1.13.4/archival/libipkg/libipkg.h
---- busybox-1.13.4.orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/libipkg.h 2009-05-31 15:40:37.069994700 +0200
-@@ -0,0 +1,87 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/libipkg.h busybox-1.15.2/archival/libipkg/libipkg.h
+--- busybox-1.15.2.orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/libipkg.h 2010-03-14 21:00:54.000000000 +0100
+@@ -0,0 +1,78 @@
+/* ipkglib.h - the itsy package management system
+
+ Florian Boor <florian.boor@kernelconcepts.de>
@@ -7256,8 +7216,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.h busybox-1.13.4/archival
+#ifndef IPKGLIB_H
+#define IPKGLIB_H
+
-+#ifdef IPKG_LIB
-+
+#include "ipkg_conf.h"
+#include "ipkg_message.h"
+
@@ -7317,17 +7275,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/libipkg.h busybox-1.13.4/archival
+extern void reverse_error_list(struct errlist **errors);
+extern void free_error_list(struct errlist **errors);
+
-+#else
-+
-+extern int ipkg_op(int argc, char *argv[]);
-+
-+#endif
-+
-+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair.c busybox-1.13.4/archival/libipkg/nv_pair.c
---- busybox-1.13.4.orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/nv_pair.c 2009-05-31 15:40:37.073994372 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/nv_pair.c busybox-1.15.2/archival/libipkg/nv_pair.c
+--- busybox-1.15.2.orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/nv_pair.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,40 @@
+/* nv_pair.c - the itsy package management system
+
@@ -7369,9 +7320,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair.c busybox-1.13.4/archival
+}
+
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair.h busybox-1.13.4/archival/libipkg/nv_pair.h
---- busybox-1.13.4.orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/nv_pair.h 2009-05-31 15:40:37.073994372 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/nv_pair.h busybox-1.15.2/archival/libipkg/nv_pair.h
+--- busybox-1.15.2.orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/nv_pair.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,32 @@
+/* nv_pair.h - the itsy package management system
+
@@ -7405,9 +7356,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair.h busybox-1.13.4/archival
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair_list.c busybox-1.13.4/archival/libipkg/nv_pair_list.c
---- busybox-1.13.4.orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/nv_pair_list.c 2009-05-31 15:40:37.073994372 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/nv_pair_list.c busybox-1.15.2/archival/libipkg/nv_pair_list.c
+--- busybox-1.15.2.orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/nv_pair_list.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,98 @@
+/* nv_pair_list.c - the itsy package management system
+
@@ -7507,9 +7458,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair_list.c busybox-1.13.4/arc
+ }
+ return NULL;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair_list.h busybox-1.13.4/archival/libipkg/nv_pair_list.h
---- busybox-1.13.4.orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/nv_pair_list.h 2009-05-31 15:40:37.085996181 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/nv_pair_list.h busybox-1.15.2/archival/libipkg/nv_pair_list.h
+--- busybox-1.15.2.orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/nv_pair_list.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,60 @@
+/* nv_pair_list.h - the itsy package management system
+
@@ -7571,9 +7522,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/nv_pair_list.h busybox-1.13.4/arc
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg.c busybox-1.13.4/archival/libipkg/pkg.c
---- busybox-1.13.4.orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg.c 2009-05-31 15:40:37.089995574 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg.c busybox-1.15.2/archival/libipkg/pkg.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,1757 @@
+/* pkg.c - the itsy package management system
+
@@ -9332,242 +9283,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg.c busybox-1.13.4/archival/lib
+ }
+ return 0;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg.h busybox-1.13.4/archival/libipkg/pkg.h
---- busybox-1.13.4.orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg.h 2009-05-31 15:40:37.109997565 +0200
-@@ -0,0 +1,229 @@
-+/* pkg.h - the itsy package management system
-+
-+ Carl D. Worth
-+
-+ Copyright (C) 2001 University of Southern California
-+
-+ This program is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU General Public License as
-+ published by the Free Software Foundation; either version 2, or (at
-+ your option) any later version.
-+
-+ This program is distributed in the hope that it will be useful, but
-+ WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ General Public License for more details.
-+*/
-+
-+#ifndef PKG_H
-+#define PKG_H
-+
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
-+
-+#include "pkg_vec.h"
-+#include "str_list.h"
-+#include "pkg_src.h"
-+#include "pkg_dest.h"
-+#include "ipkg_conf.h"
-+#include "conffile_list.h"
-+
-+struct ipkg_conf;
-+
-+/* I think "Size" is currently the shortest field name */
-+#define PKG_MINIMUM_FIELD_NAME_LEN 4
-+
-+enum pkg_state_want
-+{
-+ SW_UNKNOWN = 1,
-+ SW_INSTALL,
-+ SW_DEINSTALL,
-+ SW_PURGE,
-+ SW_LAST_STATE_WANT
-+};
-+typedef enum pkg_state_want pkg_state_want_t;
-+
-+enum pkg_state_flag
-+{
-+ SF_OK = 0,
-+ SF_REINSTREQ = 1,
-+ SF_HOLD = 2, /* do not upgrade version */
-+ SF_REPLACE = 4, /* replace this package */
-+ SF_NOPRUNE = 8, /* do not remove obsolete files */
-+ SF_PREFER = 16, /* prefer this version */
-+ SF_OBSOLETE = 32, /* old package in upgrade pair */
-+ SF_MARKED = 64, /* temporary mark */
-+ SF_FILELIST_CHANGED = 128, /* needs filelist written */
-+ SF_USER = 256,
-+ SF_LAST_STATE_FLAG
-+};
-+typedef enum pkg_state_flag pkg_state_flag_t;
-+#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER)
-+
-+enum pkg_state_status
-+{
-+ SS_NOT_INSTALLED = 1,
-+ SS_UNPACKED,
-+ SS_HALF_CONFIGURED,
-+ SS_INSTALLED,
-+ SS_HALF_INSTALLED,
-+ SS_CONFIG_FILES,
-+ SS_POST_INST_FAILED,
-+ SS_REMOVAL_FAILED,
-+ SS_LAST_STATE_STATUS
-+};
-+typedef enum pkg_state_status pkg_state_status_t;
-+
-+struct abstract_pkg{
-+ char * name;
-+ int dependencies_checked;
-+ pkg_vec_t * pkgs;
-+ pkg_state_status_t state_status;
-+ pkg_state_flag_t state_flag;
-+ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */
-+ abstract_pkg_vec_t * provided_by;
-+ abstract_pkg_vec_t * replaced_by;
-+};
-+
-+#include "pkg_depends.h"
-+
-+/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways:
-+
-+ The 3 version fields should go into a single version struct. (This
-+ is especially important since, currently, pkg->version can easily
-+ be mistaken for pkg_verson_str_alloc(pkg) although they are very
-+ distinct. This has been the source of multiple bugs.
-+
-+ The 3 state fields could possibly also go into their own struct.
-+
-+ All fields which deal with lists of packages, (Depends,
-+ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each
-+ be handled by a single struct in pkg_t
-+
-+ All string fields for which there is a small set of possible
-+ values, (section, maintainer, architecture, maybe version?), that
-+ are reused among different packages -- for all such packages we
-+ should move from "char *"s to some atom datatype to share data
-+ storage and use less memory. We might even do reference counting,
-+ but probably not since most often we only create new pkg_t structs,
-+ we don't often free them. */
-+struct pkg
-+{
-+ char *name;
-+ unsigned long epoch;
-+ char *version;
-+ char *revision;
-+ char *familiar_revision;
-+ pkg_src_t *src;
-+ pkg_dest_t *dest;
-+ char *architecture;
-+ char *section;
-+ char *maintainer;
-+ char *description;
-+ pkg_state_want_t state_want;
-+ pkg_state_flag_t state_flag;
-+ pkg_state_status_t state_status;
-+ char **depends_str;
-+ int depends_count;
-+ char **pre_depends_str;
-+ int pre_depends_count;
-+ char **recommends_str;
-+ int recommends_count;
-+ char **suggests_str;
-+ int suggests_count;
-+ compound_depend_t * depends;
-+
-+ /* Abhaya: new conflicts */
-+ char **conflicts_str;
-+ compound_depend_t * conflicts;
-+ int conflicts_count;
-+
-+ char **replaces_str;
-+ int replaces_count;
-+ abstract_pkg_t ** replaces;
-+
-+ char **provides_str;
-+ int provides_count;
-+ abstract_pkg_t ** provides;
-+
-+ abstract_pkg_t *parent;
-+
-+ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */
-+
-+ char *filename;
-+ char *local_filename;
-+ char *url;
-+ char *tmp_unpack_dir;
-+ char *md5sum;
-+ char *size;
-+ char *installed_size;
-+ char *priority;
-+ char *source;
-+ conffile_list_t conffiles;
-+ time_t installed_time;
-+ /* As pointer for lazy evaluation */
-+ str_list_t *installed_files;
-+ /* XXX: CLEANUP: I'd like to perhaps come up with a better
-+ mechanism to avoid the problem here, (which is that the
-+ installed_files list was being freed from an inner loop while
-+ still being used within an outer loop. */
-+ int installed_files_ref_cnt;
-+ int essential;
-+ int arch_priority;
-+/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */
-+ int provided_by_hand;
-+};
-+
-+pkg_t *pkg_new(void);
-+int pkg_init(pkg_t *pkg);
-+void pkg_deinit(pkg_t *pkg);
-+int pkg_init_from_file(pkg_t *pkg, const char *filename);
-+abstract_pkg_t *abstract_pkg_new(void);
-+int abstract_pkg_init(abstract_pkg_t *ab_pkg);
-+
-+/*
-+ * merges fields from newpkg into oldpkg.
-+ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero
-+ */
-+int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status);
-+
-+char *pkg_version_str_alloc(pkg_t *pkg);
-+
-+int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg);
-+int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b);
-+int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b);
-+
-+char * pkg_formatted_info(pkg_t *pkg );
-+char * pkg_formatted_field(pkg_t *pkg, const char *field );
-+
-+void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg);
-+
-+void pkg_print_info(pkg_t *pkg, FILE *file);
-+void pkg_print_status(pkg_t * pkg, FILE * file);
-+void pkg_print_field(pkg_t *pkg, FILE *file, const char *field);
-+str_list_t *pkg_get_installed_files(pkg_t *pkg);
-+int pkg_free_installed_files(pkg_t *pkg);
-+int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg);
-+conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name);
-+int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg,
-+ const char *script, const char *args);
-+
-+/* enum mappings */
-+char *pkg_state_want_to_str(pkg_state_want_t sw);
-+pkg_state_want_t pkg_state_want_from_str(char *str);
-+char *pkg_state_flag_to_str(pkg_state_flag_t sf);
-+pkg_state_flag_t pkg_state_flag_from_str(char *str);
-+char *pkg_state_status_to_str(pkg_state_status_t ss);
-+pkg_state_status_t pkg_state_status_from_str(char *str);
-+
-+int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op);
-+
-+int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg);
-+int pkg_info_preinstall_check(ipkg_conf_t *conf);
-+int pkg_free_installed_files(pkg_t *pkg);
-+
-+int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg);
-+int pkg_write_changed_filelists(ipkg_conf_t *conf);
-+
-+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_depends.c busybox-1.13.4/archival/libipkg/pkg_depends.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_depends.c 2009-05-31 15:40:37.093995246 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_depends.c busybox-1.15.2/archival/libipkg/pkg_depends.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_depends.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,1032 @@
+/* pkg_depends.c - the itsy package management system
+
@@ -10601,9 +10319,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_depends.c busybox-1.13.4/arch
+
+ return 0;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_depends.h busybox-1.13.4/archival/libipkg/pkg_depends.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_depends.h 2009-05-31 15:40:37.093995246 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_depends.h busybox-1.15.2/archival/libipkg/pkg_depends.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_depends.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,105 @@
+/* pkg_depends.h - the itsy package management system
+
@@ -10710,9 +10428,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_depends.h busybox-1.13.4/arch
+int pkg_dependence_satisfied(depend_t *depend);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest.c busybox-1.13.4/archival/libipkg/pkg_dest.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_dest.c 2009-05-31 15:40:37.093995246 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_dest.c busybox-1.15.2/archival/libipkg/pkg_dest.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_dest.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,92 @@
+/* pkg_dest.c - the itsy package management system
+
@@ -10806,9 +10524,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest.c busybox-1.13.4/archiva
+
+ dest->root_dir = NULL;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest.h busybox-1.13.4/archival/libipkg/pkg_dest.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_dest.h 2009-05-31 15:40:37.097996035 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_dest.h busybox-1.15.2/archival/libipkg/pkg_dest.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_dest.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,38 @@
+/* pkg_dest.h - the itsy package management system
+
@@ -10848,9 +10566,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest.h busybox-1.13.4/archiva
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest_list.c busybox-1.13.4/archival/libipkg/pkg_dest_list.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_dest_list.c 2009-05-31 15:40:37.097996035 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_dest_list.c busybox-1.15.2/archival/libipkg/pkg_dest_list.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_dest_list.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,85 @@
+/* pkg_dest_list.c - the itsy package management system
+
@@ -10937,9 +10655,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest_list.c busybox-1.13.4/ar
+{
+ return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list);
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest_list.h busybox-1.13.4/archival/libipkg/pkg_dest_list.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_dest_list.h 2009-05-31 15:40:37.097996035 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_dest_list.h busybox-1.15.2/archival/libipkg/pkg_dest_list.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_dest_list.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,50 @@
+/* pkg_dest_list.h - the itsy package management system
+
@@ -10991,9 +10709,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_dest_list.h busybox-1.13.4/ar
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_extract.c busybox-1.13.4/archival/libipkg/pkg_extract.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_extract.c 2009-05-31 15:40:37.097996035 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_extract.c busybox-1.15.2/archival/libipkg/pkg_extract.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_extract.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,225 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -11220,9 +10938,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_extract.c busybox-1.13.4/arch
+
+ return 0;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_extract.h busybox-1.13.4/archival/libipkg/pkg_extract.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_extract.h 2009-05-31 15:40:37.105997055 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_extract.h busybox-1.15.2/archival/libipkg/pkg_extract.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_extract.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,32 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -11256,9 +10974,242 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_extract.h busybox-1.13.4/arch
+int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_hash.c busybox-1.13.4/archival/libipkg/pkg_hash.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_hash.c 2009-05-31 15:40:37.109997565 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg.h busybox-1.15.2/archival/libipkg/pkg.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg.h 2010-03-14 20:53:41.000000000 +0100
+@@ -0,0 +1,229 @@
++/* pkg.h - the itsy package management system
++
++ Carl D. Worth
++
++ Copyright (C) 2001 University of Southern California
++
++ This program is free software; you can redistribute it and/or
++ modify it under the terms of the GNU General Public License as
++ published by the Free Software Foundation; either version 2, or (at
++ your option) any later version.
++
++ This program is distributed in the hope that it will be useful, but
++ WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ General Public License for more details.
++*/
++
++#ifndef PKG_H
++#define PKG_H
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++
++#include "pkg_vec.h"
++#include "str_list.h"
++#include "pkg_src.h"
++#include "pkg_dest.h"
++#include "ipkg_conf.h"
++#include "conffile_list.h"
++
++struct ipkg_conf;
++
++/* I think "Size" is currently the shortest field name */
++#define PKG_MINIMUM_FIELD_NAME_LEN 4
++
++enum pkg_state_want
++{
++ SW_UNKNOWN = 1,
++ SW_INSTALL,
++ SW_DEINSTALL,
++ SW_PURGE,
++ SW_LAST_STATE_WANT
++};
++typedef enum pkg_state_want pkg_state_want_t;
++
++enum pkg_state_flag
++{
++ SF_OK = 0,
++ SF_REINSTREQ = 1,
++ SF_HOLD = 2, /* do not upgrade version */
++ SF_REPLACE = 4, /* replace this package */
++ SF_NOPRUNE = 8, /* do not remove obsolete files */
++ SF_PREFER = 16, /* prefer this version */
++ SF_OBSOLETE = 32, /* old package in upgrade pair */
++ SF_MARKED = 64, /* temporary mark */
++ SF_FILELIST_CHANGED = 128, /* needs filelist written */
++ SF_USER = 256,
++ SF_LAST_STATE_FLAG
++};
++typedef enum pkg_state_flag pkg_state_flag_t;
++#define SF_NONVOLATILE_FLAGS (SF_HOLD|SF_NOPRUNE|SF_PREFER|SF_OBSOLETE|SF_USER)
++
++enum pkg_state_status
++{
++ SS_NOT_INSTALLED = 1,
++ SS_UNPACKED,
++ SS_HALF_CONFIGURED,
++ SS_INSTALLED,
++ SS_HALF_INSTALLED,
++ SS_CONFIG_FILES,
++ SS_POST_INST_FAILED,
++ SS_REMOVAL_FAILED,
++ SS_LAST_STATE_STATUS
++};
++typedef enum pkg_state_status pkg_state_status_t;
++
++struct abstract_pkg{
++ char * name;
++ int dependencies_checked;
++ pkg_vec_t * pkgs;
++ pkg_state_status_t state_status;
++ pkg_state_flag_t state_flag;
++ struct abstract_pkg ** depended_upon_by; /* @@@@ this should be abstract_pkg_vec_t -Jamey */
++ abstract_pkg_vec_t * provided_by;
++ abstract_pkg_vec_t * replaced_by;
++};
++
++#include "pkg_depends.h"
++
++/* XXX: CLEANUP: I'd like to clean up pkg_t in several ways:
++
++ The 3 version fields should go into a single version struct. (This
++ is especially important since, currently, pkg->version can easily
++ be mistaken for pkg_verson_str_alloc(pkg) although they are very
++ distinct. This has been the source of multiple bugs.
++
++ The 3 state fields could possibly also go into their own struct.
++
++ All fields which deal with lists of packages, (Depends,
++ Pre-Depends, Provides, Suggests, Recommends, Enhances), should each
++ be handled by a single struct in pkg_t
++
++ All string fields for which there is a small set of possible
++ values, (section, maintainer, architecture, maybe version?), that
++ are reused among different packages -- for all such packages we
++ should move from "char *"s to some atom datatype to share data
++ storage and use less memory. We might even do reference counting,
++ but probably not since most often we only create new pkg_t structs,
++ we don't often free them. */
++struct pkg
++{
++ char *name;
++ unsigned long epoch;
++ char *version;
++ char *revision;
++ char *familiar_revision;
++ pkg_src_t *src;
++ pkg_dest_t *dest;
++ char *architecture;
++ char *section;
++ char *maintainer;
++ char *description;
++ pkg_state_want_t state_want;
++ pkg_state_flag_t state_flag;
++ pkg_state_status_t state_status;
++ char **depends_str;
++ int depends_count;
++ char **pre_depends_str;
++ int pre_depends_count;
++ char **recommends_str;
++ int recommends_count;
++ char **suggests_str;
++ int suggests_count;
++ compound_depend_t * depends;
++
++ /* Abhaya: new conflicts */
++ char **conflicts_str;
++ compound_depend_t * conflicts;
++ int conflicts_count;
++
++ char **replaces_str;
++ int replaces_count;
++ abstract_pkg_t ** replaces;
++
++ char **provides_str;
++ int provides_count;
++ abstract_pkg_t ** provides;
++
++ abstract_pkg_t *parent;
++
++ pkg_t *old_pkg; /* during upgrade, points from installee to previously installed */
++
++ char *filename;
++ char *local_filename;
++ char *url;
++ char *tmp_unpack_dir;
++ char *md5sum;
++ char *size;
++ char *installed_size;
++ char *priority;
++ char *source;
++ conffile_list_t conffiles;
++ time_t installed_time;
++ /* As pointer for lazy evaluation */
++ str_list_t *installed_files;
++ /* XXX: CLEANUP: I'd like to perhaps come up with a better
++ mechanism to avoid the problem here, (which is that the
++ installed_files list was being freed from an inner loop while
++ still being used within an outer loop. */
++ int installed_files_ref_cnt;
++ int essential;
++ int arch_priority;
++/* Adding this flag, to "force" ipkg to choose a "provided_by_hand" package, if there are multiple choice */
++ int provided_by_hand;
++};
++
++pkg_t *pkg_new(void);
++int pkg_init(pkg_t *pkg);
++void pkg_deinit(pkg_t *pkg);
++int pkg_init_from_file(pkg_t *pkg, const char *filename);
++abstract_pkg_t *abstract_pkg_new(void);
++int abstract_pkg_init(abstract_pkg_t *ab_pkg);
++
++/*
++ * merges fields from newpkg into oldpkg.
++ * Forcibly sets oldpkg state_status, state_want and state_flags if set_status is nonzero
++ */
++int pkg_merge(pkg_t *oldpkg, pkg_t *newpkg, int set_status);
++
++char *pkg_version_str_alloc(pkg_t *pkg);
++
++int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg);
++int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b);
++int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b);
++
++char * pkg_formatted_info(pkg_t *pkg );
++char * pkg_formatted_field(pkg_t *pkg, const char *field );
++
++void set_flags_from_control(ipkg_conf_t *conf, pkg_t *pkg);
++
++void pkg_print_info(pkg_t *pkg, FILE *file);
++void pkg_print_status(pkg_t * pkg, FILE * file);
++void pkg_print_field(pkg_t *pkg, FILE *file, const char *field);
++str_list_t *pkg_get_installed_files(pkg_t *pkg);
++int pkg_free_installed_files(pkg_t *pkg);
++int pkg_remove_installed_files_list(ipkg_conf_t *conf, pkg_t *pkg);
++conffile_t *pkg_get_conffile(pkg_t *pkg, const char *file_name);
++int pkg_run_script(struct ipkg_conf *conf, pkg_t *pkg,
++ const char *script, const char *args);
++
++/* enum mappings */
++char *pkg_state_want_to_str(pkg_state_want_t sw);
++pkg_state_want_t pkg_state_want_from_str(char *str);
++char *pkg_state_flag_to_str(pkg_state_flag_t sf);
++pkg_state_flag_t pkg_state_flag_from_str(char *str);
++char *pkg_state_status_to_str(pkg_state_status_t ss);
++pkg_state_status_t pkg_state_status_from_str(char *str);
++
++int pkg_version_satisfied(pkg_t *it, pkg_t *ref, const char *op);
++
++int pkg_arch_supported(ipkg_conf_t *conf, pkg_t *pkg);
++int pkg_info_preinstall_check(ipkg_conf_t *conf);
++int pkg_free_installed_files(pkg_t *pkg);
++
++int pkg_write_filelist(ipkg_conf_t *conf, pkg_t *pkg);
++int pkg_write_changed_filelists(ipkg_conf_t *conf);
++
++#endif
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_hash.c busybox-1.15.2/archival/libipkg/pkg_hash.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_hash.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,623 @@
+/* ipkg_hash.c - the itsy package management system
+
@@ -11883,9 +11834,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_hash.c busybox-1.13.4/archiva
+}
+
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_hash.h busybox-1.13.4/archival/libipkg/pkg_hash.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_hash.h 2009-05-31 15:40:37.113996958 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_hash.h busybox-1.15.2/archival/libipkg/pkg_hash.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_hash.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,61 @@
+/* pkg_hash.h - the itsy package management system
+
@@ -11948,9 +11899,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_hash.h busybox-1.13.4/archiva
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_parse.c busybox-1.13.4/archival/libipkg/pkg_parse.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_parse.c 2009-05-31 15:40:37.113996958 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_parse.c busybox-1.15.2/archival/libipkg/pkg_parse.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_parse.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,368 @@
+/* pkg_parse.c - the itsy package management system
+
@@ -12320,9 +12271,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_parse.c busybox-1.13.4/archiv
+
+ return 0;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_parse.h busybox-1.13.4/archival/libipkg/pkg_parse.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_parse.h 2009-05-31 15:40:37.113996958 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_parse.h busybox-1.15.2/archival/libipkg/pkg_parse.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_parse.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,31 @@
+/* pkg_parse.h - the itsy package management system
+
@@ -12355,9 +12306,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_parse.h busybox-1.13.4/archiv
+int pkg_valorize_other_field(pkg_t *pkg, char ***raw);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src.c busybox-1.13.4/archival/libipkg/pkg_src.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_src.c 2009-05-31 15:40:37.113996958 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_src.c busybox-1.15.2/archival/libipkg/pkg_src.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_src.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,43 @@
+/* pkg_src.c - the itsy package management system
+
@@ -12402,9 +12353,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src.c busybox-1.13.4/archival
+}
+
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src.h busybox-1.13.4/archival/libipkg/pkg_src.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_src.h 2009-05-31 15:40:37.117996909 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_src.h busybox-1.15.2/archival/libipkg/pkg_src.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_src.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,34 @@
+/* pkg_src.h - the itsy package management system
+
@@ -12440,9 +12391,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src.h busybox-1.13.4/archival
+void pkg_src_deinit(pkg_src_t *src);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src_list.c busybox-1.13.4/archival/libipkg/pkg_src_list.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_src_list.c 2009-05-31 15:40:37.117996909 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_src_list.c busybox-1.15.2/archival/libipkg/pkg_src_list.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_src_list.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,75 @@
+/* pkg_src_list.c - the itsy package management system
+
@@ -12519,9 +12470,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src_list.c busybox-1.13.4/arc
+{
+ return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list);
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src_list.h busybox-1.13.4/archival/libipkg/pkg_src_list.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_src_list.h 2009-05-31 15:40:37.117996909 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_src_list.h busybox-1.15.2/archival/libipkg/pkg_src_list.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_src_list.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,57 @@
+/* pkg_src_list.h - the itsy package management system
+
@@ -12580,9 +12531,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_src_list.h busybox-1.13.4/arc
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_vec.c busybox-1.13.4/archival/libipkg/pkg_vec.c
---- busybox-1.13.4.orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_vec.c 2009-05-31 15:40:37.117996909 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_vec.c busybox-1.15.2/archival/libipkg/pkg_vec.c
+--- busybox-1.15.2.orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_vec.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,231 @@
+/* pkg_vec.c - the itsy package management system
+
@@ -12815,9 +12766,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_vec.c busybox-1.13.4/archival
+ qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar);
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_vec.h busybox-1.13.4/archival/libipkg/pkg_vec.h
---- busybox-1.13.4.orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/pkg_vec.h 2009-05-31 15:40:37.121997140 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/pkg_vec.h busybox-1.15.2/archival/libipkg/pkg_vec.h
+--- busybox-1.15.2.orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/pkg_vec.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,62 @@
+/* pkg_vec.h - the itsy package management system
+
@@ -12881,9 +12832,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/pkg_vec.h busybox-1.13.4/archival
+void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *));
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/sprintf_alloc.h busybox-1.13.4/archival/libipkg/sprintf_alloc.h
---- busybox-1.13.4.orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/sprintf_alloc.h 2009-05-31 15:40:37.121997140 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/sprintf_alloc.h busybox-1.15.2/archival/libipkg/sprintf_alloc.h
+--- busybox-1.15.2.orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/sprintf_alloc.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,25 @@
+/* sprintf_alloca.c -- like sprintf with memory allocation
+
@@ -12910,9 +12861,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/sprintf_alloc.h busybox-1.13.4/ar
+#define sprintf_alloc(str, fmt, args...) *str = xasprintf(fmt, ## args)
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/str_list.c busybox-1.13.4/archival/libipkg/str_list.c
---- busybox-1.13.4.orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/str_list.c 2009-05-31 15:40:37.121997140 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/str_list.c busybox-1.15.2/archival/libipkg/str_list.c
+--- busybox-1.15.2.orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/str_list.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,76 @@
+/* str_list.c - the itsy package management system
+
@@ -12990,9 +12941,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/str_list.c busybox-1.13.4/archiva
+ (void *)target_str,
+ (void_list_cmp_t)strcmp);
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/str_list.h busybox-1.13.4/archival/libipkg/str_list.h
---- busybox-1.13.4.orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/str_list.h 2009-05-31 15:40:37.121997140 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/str_list.h busybox-1.15.2/archival/libipkg/str_list.h
+--- busybox-1.15.2.orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/str_list.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,51 @@
+/* str_list.h - the itsy package management system
+
@@ -13045,9 +12996,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/str_list.h busybox-1.13.4/archiva
+char *str_list_remove_elt(str_list_t *list, const char *target_str);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/str_util.c busybox-1.13.4/archival/libipkg/str_util.c
---- busybox-1.13.4.orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/str_util.c 2009-05-31 15:40:37.125998767 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/str_util.c busybox-1.15.2/archival/libipkg/str_util.c
+--- busybox-1.15.2.orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/str_util.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,69 @@
+/* str_utils.c - the itsy package management system
+
@@ -13118,9 +13069,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/str_util.c busybox-1.13.4/archiva
+ return str ? strdup(str) : NULL;
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/str_util.h busybox-1.13.4/archival/libipkg/str_util.h
---- busybox-1.13.4.orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/str_util.h 2009-05-31 15:40:37.125998767 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/str_util.h busybox-1.15.2/archival/libipkg/str_util.h
+--- busybox-1.15.2.orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/str_util.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,27 @@
+/* str_utils.h - the itsy package management system
+
@@ -13149,10 +13100,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/str_util.h busybox-1.13.4/archiva
+char *str_dup_safe(const char *str);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/user.c busybox-1.13.4/archival/libipkg/user.c
---- busybox-1.13.4.orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/user.c 2009-05-31 15:40:37.129998160 +0200
-@@ -0,0 +1,61 @@
+diff -Nur busybox-1.15.2.orig/archival/libipkg/user.c busybox-1.15.2/archival/libipkg/user.c
+--- busybox-1.15.2.orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/user.c 2010-03-14 20:59:41.000000000 +0100
+@@ -0,0 +1,49 @@
+/* user.c - the itsy package management system
+
+ Jamey Hicks
@@ -13176,17 +13127,12 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/user.c busybox-1.13.4/archival/li
+#include "libbb.h"
+#include "file_util.h"
+#include "str_util.h"
-+#ifdef IPKG_LIB
+#include "libipkg.h"
-+#endif
+
+char *get_user_response(const char *format, ...);
-+
-+
-+#ifdef IPKG_LIB
+static char *question = NULL;
+static int question_len = 255;
-+#endif
++
+char *get_user_response(const char *format, ...)
+{
+ int len = question_len;
@@ -13194,12 +13140,6 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/user.c busybox-1.13.4/archival/li
+ char *response;
+ va_start(ap, format);
+
-+#ifndef IPKG_LIB
-+ vprintf(format, ap);
-+ do {
-+ response = file_read_line_alloc(stdin);
-+ } while (response == NULL);
-+#else
+ do {
+ if (question == NULL || len > question_len) {
+ question = realloc(question, len + 1);
@@ -13208,15 +13148,14 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/user.c busybox-1.13.4/archival/li
+ len = vsnprintf(question,question_len,format,ap);
+ } while (len > question_len);
+ response = strdup(ipkg_cb_response(question));
-+#endif
+ str_chomp(response);
+ str_tolower(response);
+
+ return response;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/user.h busybox-1.13.4/archival/libipkg/user.h
---- busybox-1.13.4.orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/user.h 2009-05-31 15:40:37.129998160 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/user.h busybox-1.15.2/archival/libipkg/user.h
+--- busybox-1.15.2.orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/user.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,23 @@
+/* user.c - the itsy package management system
+
@@ -13241,9 +13180,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/user.h busybox-1.13.4/archival/li
+
+char *get_user_response(const char *format, ...);
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/void_list.c busybox-1.13.4/archival/libipkg/void_list.c
---- busybox-1.13.4.orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/void_list.c 2009-05-31 15:40:37.129998160 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/void_list.c busybox-1.15.2/archival/libipkg/void_list.c
+--- busybox-1.15.2.orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/void_list.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,194 @@
+/* void_list.c - the itsy package management system
+
@@ -13439,9 +13378,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/void_list.c busybox-1.13.4/archiv
+ else
+ return NULL;
+}
-diff -Nur busybox-1.13.4.orig/archival/libipkg/void_list.h busybox-1.13.4/archival/libipkg/void_list.h
---- busybox-1.13.4.orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/void_list.h 2009-05-31 15:40:37.129998160 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/void_list.h busybox-1.15.2/archival/libipkg/void_list.h
+--- busybox-1.15.2.orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/void_list.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,59 @@
+/* void_list.h - the itsy package management system
+
@@ -13502,9 +13441,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/void_list.h busybox-1.13.4/archiv
+void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp);
+
+#endif
-diff -Nur busybox-1.13.4.orig/archival/libipkg/xsystem.c busybox-1.13.4/archival/libipkg/xsystem.c
---- busybox-1.13.4.orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/xsystem.c 2009-05-31 15:40:37.133998111 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/xsystem.c busybox-1.15.2/archival/libipkg/xsystem.c
+--- busybox-1.15.2.orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/xsystem.c 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,64 @@
+/* xsystem.c - system(3) with error messages
+
@@ -13570,9 +13509,9 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/xsystem.c busybox-1.13.4/archival
+ return -1;
+}
+
-diff -Nur busybox-1.13.4.orig/archival/libipkg/xsystem.h busybox-1.13.4/archival/libipkg/xsystem.h
---- busybox-1.13.4.orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.13.4/archival/libipkg/xsystem.h 2009-05-31 15:40:37.133998111 +0200
+diff -Nur busybox-1.15.2.orig/archival/libipkg/xsystem.h busybox-1.15.2/archival/libipkg/xsystem.h
+--- busybox-1.15.2.orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.15.2/archival/libipkg/xsystem.h 2010-03-14 20:53:41.000000000 +0100
@@ -0,0 +1,34 @@
+/* xsystem.h - system(3) with error messages
+
@@ -13608,21 +13547,10 @@ diff -Nur busybox-1.13.4.orig/archival/libipkg/xsystem.h busybox-1.13.4/archival
+
+#endif
+
-diff -Nur busybox-1.13.4.orig/archival/libunarchive/Kbuild busybox-1.13.4/archival/libunarchive/Kbuild
---- busybox-1.13.4.orig/archival/libunarchive/Kbuild 2008-11-09 18:28:02.000000000 +0100
-+++ busybox-1.13.4/archival/libunarchive/Kbuild 2009-05-31 15:40:37.133998111 +0200
-@@ -39,6 +39,7 @@
- lib-$(CONFIG_DPKG) += $(DPKG_FILES)
- lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
- lib-$(CONFIG_GUNZIP) += decompress_unzip.o
-+lib-$(CONFIG_IPKG) += open_transformer.o get_header_tar.o get_header_tar_gz.o
- lib-$(CONFIG_RPM2CPIO) += decompress_unzip.o get_header_cpio.o
- lib-$(CONFIG_RPM) += open_transformer.o decompress_unzip.o get_header_cpio.o
- lib-$(CONFIG_TAR) += get_header_tar.o
-diff -Nur busybox-1.13.4.orig/archival/libunarchive/data_extract_all.c busybox-1.13.4/archival/libunarchive/data_extract_all.c
---- busybox-1.13.4.orig/archival/libunarchive/data_extract_all.c 2008-11-09 18:28:02.000000000 +0100
-+++ busybox-1.13.4/archival/libunarchive/data_extract_all.c 2009-05-31 15:40:37.133998111 +0200
-@@ -146,3 +146,16 @@
+diff -Nur busybox-1.15.2.orig/archival/libunarchive/data_extract_all.c busybox-1.15.2/archival/libunarchive/data_extract_all.c
+--- busybox-1.15.2.orig/archival/libunarchive/data_extract_all.c 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2/archival/libunarchive/data_extract_all.c 2010-03-14 20:53:41.000000000 +0100
+@@ -147,3 +147,16 @@
}
}
}
@@ -13639,69 +13567,32 @@ diff -Nur busybox-1.13.4.orig/archival/libunarchive/data_extract_all.c busybox-1
+ data_extract_all(archive_handle);
+ }
+}
-diff -Nur busybox-1.13.4.orig/coreutils/md5_sha1_sum.c busybox-1.13.4/coreutils/md5_sha1_sum.c
---- busybox-1.13.4.orig/coreutils/md5_sha1_sum.c 2008-11-09 18:28:07.000000000 +0100
-+++ busybox-1.13.4/coreutils/md5_sha1_sum.c 2009-05-31 15:40:37.141999131 +0200
-@@ -8,14 +8,12 @@
-
- #include "libbb.h"
-
--typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t;
--
- #define FLAG_SILENT 1
- #define FLAG_CHECK 2
- #define FLAG_WARN 4
-
- /* This might be useful elsewhere */
--static unsigned char *hash_bin_to_hex(unsigned char *hash_value,
-+unsigned char *hash_bin_to_hex(unsigned char *hash_value,
- unsigned hash_length)
- {
- /* xzalloc zero-terminates */
-@@ -24,7 +22,7 @@
- return (unsigned char *)hex_value;
- }
-
--static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
-+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
- {
- int src_fd, hash_len, count;
- union _ctx_ {
-diff -Nur busybox-1.13.4.orig/include/applets.h busybox-1.13.4/include/applets.h
---- busybox-1.13.4.orig/include/applets.h 2008-11-09 18:28:17.000000000 +0100
-+++ busybox-1.13.4/include/applets.h 2009-05-31 15:40:37.145999641 +0200
-@@ -203,6 +203,7 @@
- USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
- USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS))
-+USE_IPKG(APPLET(ipkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
- USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER))
- USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER))
-diff -Nur busybox-1.13.4.orig/include/libbb.h busybox-1.13.4/include/libbb.h
---- busybox-1.13.4.orig/include/libbb.h 2009-04-15 02:09:42.000000000 +0200
-+++ busybox-1.13.4/include/libbb.h 2009-05-31 15:40:37.149999313 +0200
-@@ -1309,6 +1309,7 @@
- extern const char bb_uuenc_tbl_std[];
- void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC;
-
-+typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t;
- typedef struct sha1_ctx_t {
- uint32_t count[2];
- uint32_t hash[5];
-@@ -1317,6 +1318,8 @@
- void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC;
- void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC;
- void *sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC;
-+unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned hash_length);
-+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo);
-
- typedef struct md5_ctx_t {
- uint32_t A;
-diff -Nur busybox-1.13.4.orig/include/unarchive.h busybox-1.13.4/include/unarchive.h
---- busybox-1.13.4.orig/include/unarchive.h 2008-11-09 18:28:17.000000000 +0100
-+++ busybox-1.13.4/include/unarchive.h 2009-05-31 15:40:37.149999313 +0200
-@@ -94,6 +94,7 @@
+diff -Nur busybox-1.15.2.orig/archival/libunarchive/Kbuild busybox-1.15.2/archival/libunarchive/Kbuild
+--- busybox-1.15.2.orig/archival/libunarchive/Kbuild 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2/archival/libunarchive/Kbuild 2010-03-14 20:53:41.000000000 +0100
+@@ -41,6 +41,7 @@
+ lib-$(CONFIG_DPKG) += $(DPKG_FILES)
+ lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
+ lib-$(CONFIG_GUNZIP) += decompress_unzip.o
++lib-$(CONFIG_IPKG) += open_transformer.o get_header_tar.o get_header_tar_gz.o
+ lib-$(CONFIG_RPM2CPIO) += decompress_unzip.o get_header_cpio.o
+ lib-$(CONFIG_RPM) += open_transformer.o decompress_unzip.o get_header_cpio.o
+ lib-$(CONFIG_TAR) += get_header_tar.o
+diff -Nur busybox-1.15.2.orig/include/applets.h busybox-1.15.2/include/applets.h
+--- busybox-1.15.2.orig/include/applets.h 2009-09-26 15:14:57.000000000 +0200
++++ busybox-1.15.2/include/applets.h 2010-03-14 20:53:41.000000000 +0100
+@@ -213,6 +213,7 @@
+ IF_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_DROP))
+ IF_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE))
+ IF_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE))
++IF_IPKG(APPLET(ipkg, _BB_DIR_USR_BIN, _BB_SUID_DROP))
+ IF_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_DROP))
+ IF_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_DROP))
+ IF_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_DROP))
+diff -Nur busybox-1.15.2.orig/include/unarchive.h busybox-1.15.2/include/unarchive.h
+--- busybox-1.15.2.orig/include/unarchive.h 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2/include/unarchive.h 2010-03-14 20:53:41.000000000 +0100
+@@ -93,6 +93,7 @@
extern void data_skip(archive_handle_t *archive_handle) FAST_FUNC;
extern void data_extract_all(archive_handle_t *archive_handle) FAST_FUNC;
@@ -13709,10 +13600,10 @@ diff -Nur busybox-1.13.4.orig/include/unarchive.h busybox-1.13.4/include/unarchi
extern void data_extract_to_stdout(archive_handle_t *archive_handle) FAST_FUNC;
extern void data_extract_to_buffer(archive_handle_t *archive_handle) FAST_FUNC;
-diff -Nur busybox-1.13.4.orig/include/usage.h busybox-1.13.4/include/usage.h
---- busybox-1.13.4.orig/include/usage.h 2008-11-09 18:28:17.000000000 +0100
-+++ busybox-1.13.4/include/usage.h 2009-05-31 15:40:37.154000102 +0200
-@@ -1425,6 +1425,82 @@
+diff -Nur busybox-1.15.2.orig/include/usage.h busybox-1.15.2/include/usage.h
+--- busybox-1.15.2.orig/include/usage.h 2009-10-08 02:59:09.000000000 +0200
++++ busybox-1.15.2/include/usage.h 2010-03-14 20:53:41.000000000 +0100
+@@ -1557,6 +1557,82 @@
"$ ls -la /tmp/busybox*\n" \
"-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
@@ -13793,5 +13684,16 @@ diff -Nur busybox-1.13.4.orig/include/usage.h busybox-1.13.4/include/usage.h
+ "\teg: ipkg info 'libstd*' or ipkg search '*libop*' or ipkg remove 'libncur*'\n"
+
#define halt_trivial_usage \
- "[-d delay] [-n] [-f]" USE_FEATURE_WTMP(" [-w]")
+ "[-d delay] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
#define halt_full_usage "\n\n" \
+diff -Nur busybox-1.15.2.orig/Makefile busybox-1.15.2/Makefile
+--- busybox-1.15.2.orig/Makefile 2009-10-08 03:06:38.000000000 +0200
++++ busybox-1.15.2/Makefile 2010-03-14 20:53:41.000000000 +0100
+@@ -445,6 +445,7 @@
+
+ libs-y := \
+ archival/ \
++ archival/libipkg/ \
+ archival/libunarchive/ \
+ console-tools/ \
+ coreutils/ \