summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-01 22:42:20 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-01 22:42:20 +0100
commitd9730197219dda09ba7a0d5321c399e0d11d23e7 (patch)
tree25e92753ba3a5beeb2785fe9508bdafa11538ea2 /package
parentb252f7521306c28b8c46f3981cf4ea26d7993625 (diff)
fix ipkg and ipkg tools, consolidate mdev.conf
cpio under macosx or bsd creates tar archives via stdin while using find . with leading ./. heirloom cpio shipped with OpenADK does remove the leading ./. Adopt ipkg busybox applet to work without ./. Fix ipkg-build to be faster and to use included cpio for inner tar creation. Dependency to GNU tar can now be dropped.
Diffstat (limited to 'package')
-rw-r--r--package/base-files/Makefile10
-rw-r--r--package/base-files/src/etc/mdev.conf15
-rw-r--r--package/busybox/Makefile2
-rw-r--r--package/busybox/patches/001-ipkg.patch1210
-rw-r--r--package/pm-utils/Makefile29
5 files changed, 648 insertions, 618 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 14a884bcf..dd500b592 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.0
-PKG_RELEASE:= 34
+PKG_RELEASE:= 35
PKG_SECTION:= base
PKG_DESCR:= basic files and scripts
@@ -43,18 +43,12 @@ endif
ifneq (${ADK_PACKAGE_ZSH},)
echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells
endif
- mkdir -p $(IDIR_BASE_FILES)/dev
- mkdir -p $(IDIR_BASE_FILES)/boot
- mkdir -p $(IDIR_BASE_FILES)/root
- mkdir -p $(IDIR_BASE_FILES)/sys
+ mkdir -p $(IDIR_BASE_FILES)/{dev,boot,root,sys,proc,tmp,mnt}
mkdir -p $(IDIR_BASE_FILES)/etc/crontabs
mkdir -p $(IDIR_BASE_FILES)/etc/network/if-pre-up.d
mkdir -p $(IDIR_BASE_FILES)/etc/network/if-up.d
mkdir -p $(IDIR_BASE_FILES)/etc/network/if-down.d
mkdir -p $(IDIR_BASE_FILES)/etc/network/if-post-down.d
- mkdir -p $(IDIR_BASE_FILES)/mnt
- mkdir -p $(IDIR_BASE_FILES)/proc
- mkdir -p $(IDIR_BASE_FILES)/tmp
mkdir -p $(IDIR_BASE_FILES)/usr/lib
mkdir -p $(IDIR_BASE_FILES)/usr/bin
chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init
diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/src/etc/mdev.conf
index 99c910d0b..69d9c0079 100644
--- a/package/base-files/src/etc/mdev.conf
+++ b/package/base-files/src/etc/mdev.conf
@@ -1,11 +1,18 @@
+rtc0 root:root 660 @ln -sf /dev/rtc0 /dev/rtc
+device-mapper 0:0 660 @mkdir /dev/mapper
tun 0:0 660 >net/tun
null 0:0 777
zero 0:0 666
+u?random 0:0 644
console 0:0 0600
-kmem 0:0 000
-mem 0:0 0640
-port 0:0 0640
ptmx 0:0 666
-tty 0:0 0666
+tty 0:0 666
ttyS* 0:0 640
+audio root:audio 660 >snd/audio
+dsp root:audio 660 >snd/dsp
+timer root:audio 660 >snd/timer
+controlC0 root:audio 660 >snd/controlC0
+pcmC0D0c root:audio 660 >snd/pcmC0D0c
+pcmC0D0p root:audio 660 >snd/pcmC0D0p
+msr0 root:root 660 @(mkdir -p /dev/cpu/0 && ln -sf /dev/msr0 /dev/cpu/0/msr)
.* 0:0 644 @/lib/mdev/init
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index b6ddc2363..d4b9e8c6a 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= busybox
PKG_VERSION:= 1.17.2
-PKG_RELEASE:= 4
+PKG_RELEASE:= 5
PKG_MD5SUM:= 7360b7138b899ee7fc885791c740c3c3
PKG_DESCR:= Core utilities for embedded systems
PKG_SECTION:= base
diff --git a/package/busybox/patches/001-ipkg.patch b/package/busybox/patches/001-ipkg.patch
index 81f831d54..10519636b 100644
--- a/package/busybox/patches/001-ipkg.patch
+++ b/package/busybox/patches/001-ipkg.patch
@@ -1,6 +1,17 @@
-diff -Nur busybox-1.17.1.orig/archival/Config.src busybox-1.17.1/archival/Config.src
---- busybox-1.17.1.orig/archival/Config.src 2010-07-25 00:12:56.000000000 +0200
-+++ busybox-1.17.1/archival/Config.src 2010-07-28 13:07:49.435987872 +0200
+diff -Nur busybox-1.17.2.orig/Makefile busybox-1.17.2/Makefile
+--- busybox-1.17.2.orig/Makefile 2010-08-23 02:51:08.000000000 +0200
++++ busybox-1.17.2/Makefile 2010-12-01 22:25:23.000000000 +0100
+@@ -464,6 +464,7 @@
+
+ libs-y := \
+ archival/ \
++ archival/libipkg/ \
+ archival/libunarchive/ \
+ console-tools/ \
+ coreutils/ \
+diff -Nur busybox-1.17.2.orig/archival/Config.src busybox-1.17.2/archival/Config.src
+--- busybox-1.17.2.orig/archival/Config.src 2010-08-22 10:21:38.000000000 +0200
++++ busybox-1.17.2/archival/Config.src 2010-12-01 22:25:23.000000000 +0100
@@ -202,6 +202,12 @@
are actually slower than gzip at equivalent compression ratios
and take up 3.2K of code.
@@ -14,9 +25,20 @@ diff -Nur busybox-1.17.1.orig/archival/Config.src busybox-1.17.1/archival/Config
config RPM2CPIO
bool "rpm2cpio"
default y
-diff -Nur busybox-1.17.1.orig/archival/ipkg.c busybox-1.17.1/archival/ipkg.c
---- busybox-1.17.1.orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/ipkg.c 2010-07-28 13:07:49.439598667 +0200
+diff -Nur busybox-1.17.2.orig/archival/Kbuild.src busybox-1.17.2/archival/Kbuild.src
+--- busybox-1.17.2.orig/archival/Kbuild.src 2010-08-23 02:44:35.000000000 +0200
++++ busybox-1.17.2/archival/Kbuild.src 2010-12-01 22:25:23.000000000 +0100
+@@ -23,6 +23,7 @@
+ lib-$(CONFIG_LZOP_COMPR_HIGH) += lzo1x_9x.o
+ lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
+ lib-$(CONFIG_BZIP2) += bzip2.o bbunzip.o
++lib-$(CONFIG_IPKG) += ipkg.o
+
+ lib-$(CONFIG_UNXZ) += bbunzip.o
+ lib-$(CONFIG_UNLZMA) += bbunzip.o
+diff -Nur busybox-1.17.2.orig/archival/ipkg.c busybox-1.17.2/archival/ipkg.c
+--- busybox-1.17.2.orig/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/ipkg.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,28 @@
+/* ipkg.c - the itsy package management system
+
@@ -46,20 +68,73 @@ diff -Nur busybox-1.17.1.orig/archival/ipkg.c busybox-1.17.1/archival/ipkg.c
+{
+ return ipkg_op(argc, argv);
+}
-diff -Nur busybox-1.17.1.orig/archival/Kbuild.src busybox-1.17.1/archival/Kbuild.src
---- busybox-1.17.1.orig/archival/Kbuild.src 2010-07-06 04:25:53.000000000 +0200
-+++ busybox-1.17.1/archival/Kbuild.src 2010-07-28 13:07:49.439598667 +0200
-@@ -23,6 +23,7 @@
- lib-$(CONFIG_LZOP_COMPR_HIGH) += lzo1x_9x.o
- lib-$(CONFIG_GZIP) += gzip.o bbunzip.o
- lib-$(CONFIG_BZIP2) += bzip2.o bbunzip.o
-+lib-$(CONFIG_IPKG) += ipkg.o
-
- lib-$(CONFIG_UNXZ) += bbunzip.o
- lib-$(CONFIG_UNLZMA) += bbunzip.o
-diff -Nur busybox-1.17.1.orig/archival/libipkg/args.c busybox-1.17.1/archival/libipkg/args.c
---- busybox-1.17.1.orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/args.c 2010-07-28 13:07:49.443599457 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/Kbuild busybox-1.17.2/archival/libipkg/Kbuild
+--- busybox-1.17.2.orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/Kbuild 2010-12-01 22:25:23.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.17.2.orig/archival/libipkg/args.c busybox-1.17.2/archival/libipkg/args.c
+--- busybox-1.17.2.orig/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/args.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,242 @@
+/* args.c - parse command-line args
+
@@ -303,9 +378,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/args.c busybox-1.17.1/archival/li
+{
+ bb_error_msg("version %s\n", IPKG_VERSION);
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/args.h busybox-1.17.1/archival/libipkg/args.h
---- busybox-1.17.1.orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/args.h 2010-07-28 13:07:49.443599457 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/args.h busybox-1.17.2/archival/libipkg/args.h
+--- busybox-1.17.2.orig/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/args.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,72 @@
+/* args.h - parse command-line args
+
@@ -379,9 +454,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/args.h busybox-1.17.1/archival/li
+void args_usage(const char *complaint);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile.c busybox-1.17.1/archival/libipkg/conffile.c
---- busybox-1.17.1.orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/conffile.c 2010-07-28 13:07:49.443599457 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/conffile.c busybox-1.17.2/archival/libipkg/conffile.c
+--- busybox-1.17.2.orig/archival/libipkg/conffile.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/conffile.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,65 @@
+/* conffile.c - the itsy package management system
+
@@ -448,9 +523,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile.c busybox-1.17.1/archiva
+
+ return ret;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile.h busybox-1.17.1/archival/libipkg/conffile.h
---- busybox-1.17.1.orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/conffile.h 2010-07-28 13:07:49.451597683 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/conffile.h busybox-1.17.2/archival/libipkg/conffile.h
+--- busybox-1.17.2.orig/archival/libipkg/conffile.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/conffile.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,30 @@
+/* conffile.h - the itsy package management system
+
@@ -482,9 +557,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile.h busybox-1.17.1/archiva
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile_list.c busybox-1.17.1/archival/libipkg/conffile_list.c
---- busybox-1.17.1.orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/conffile_list.c 2010-07-28 13:07:49.451597683 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/conffile_list.c busybox-1.17.2/archival/libipkg/conffile_list.c
+--- busybox-1.17.2.orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/conffile_list.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,47 @@
+/* conffile_list.c - the itsy package management system
+
@@ -533,9 +608,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile_list.c busybox-1.17.1/ar
+ return nv_pair_list_pop(list);
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile_list.h busybox-1.17.1/archival/libipkg/conffile_list.h
---- busybox-1.17.1.orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/conffile_list.h 2010-07-28 13:07:49.451597683 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/conffile_list.h busybox-1.17.2/archival/libipkg/conffile_list.h
+--- busybox-1.17.2.orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/conffile_list.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,36 @@
+/* conffile_list.h - the itsy package management system
+
@@ -573,9 +648,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/conffile_list.h busybox-1.17.1/ar
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/file_util.c busybox-1.17.1/archival/libipkg/file_util.c
---- busybox-1.17.1.orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/file_util.c 2010-07-28 13:07:49.455597914 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/file_util.c busybox-1.17.2/archival/libipkg/file_util.c
+--- busybox-1.17.2.orig/archival/libipkg/file_util.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/file_util.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,186 @@
+/* file_util.c - convenience routines for common stat operations
+
@@ -763,9 +838,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/file_util.c busybox-1.17.1/archiv
+ return hash_file(file_name, HASH_MD5);
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/file_util.h busybox-1.17.1/archival/libipkg/file_util.h
---- busybox-1.17.1.orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/file_util.h 2010-07-28 13:07:49.455597914 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/file_util.h busybox-1.17.2/archival/libipkg/file_util.h
+--- busybox-1.17.2.orig/archival/libipkg/file_util.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/file_util.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,29 @@
+/* file_util.h - convenience routines for common file operations
+
@@ -796,9 +871,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/file_util.h busybox-1.17.1/archiv
+uint8_t *file_md5sum_alloc(const char *file_name);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/hash_table.c busybox-1.17.1/archival/libipkg/hash_table.c
---- busybox-1.17.1.orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/hash_table.c 2010-07-28 13:07:49.455597914 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/hash_table.c busybox-1.17.2/archival/libipkg/hash_table.c
+--- busybox-1.17.2.orig/archival/libipkg/hash_table.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/hash_table.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,155 @@
+/* hash.c - hash tables for ipkg
+
@@ -955,9 +1030,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/hash_table.c busybox-1.17.1/archi
+ }
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/hash_table.h busybox-1.17.1/archival/libipkg/hash_table.h
---- busybox-1.17.1.orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/hash_table.h 2010-07-28 13:07:49.455597914 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/hash_table.h busybox-1.17.2/archival/libipkg/hash_table.h
+--- busybox-1.17.2.orig/archival/libipkg/hash_table.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/hash_table.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,44 @@
+/* hash.h - hash tables for ipkg
+
@@ -1003,9 +1078,81 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/hash_table.h busybox-1.17.1/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.17.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.17.1/archival/libipkg/ipkg_cmd.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_cmd.c 2010-07-28 13:07:49.487607300 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg.h busybox-1.17.2/archival/libipkg/ipkg.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg.h 2010-12-01 22:25:23.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.17.2.orig/archival/libipkg/ipkg_cmd.c busybox-1.17.2/archival/libipkg/ipkg_cmd.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_cmd.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_cmd.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,1366 @@
+/* ipkg_cmd.c - the itsy package management system
+
@@ -2373,9 +2520,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_cmd.c busybox-1.17.1/archiva
+}
+
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_cmd.h busybox-1.17.1/archival/libipkg/ipkg_cmd.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_cmd.h 2010-07-28 13:07:49.491598591 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_cmd.h busybox-1.17.2/archival/libipkg/ipkg_cmd.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_cmd.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,41 @@
+/* ipkg_cmd.h - the itsy package management system
+
@@ -2418,9 +2565,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_cmd.h busybox-1.17.1/archiva
+int pkg_mark_provides(pkg_t *pkg);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_conf.c busybox-1.17.1/archival/libipkg/ipkg_conf.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_conf.c 2010-07-28 13:07:49.495599101 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_conf.c busybox-1.17.2/archival/libipkg/ipkg_conf.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_conf.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_conf.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,711 @@
+/* ipkg_conf.c - the itsy package management system
+
@@ -3133,9 +3280,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_conf.c busybox-1.17.1/archiv
+ sprintf_alloc(&root_filename, "%s%s", (conf->offline_root ? conf->offline_root : ""), filename);
+ return root_filename;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_conf.h busybox-1.17.1/archival/libipkg/ipkg_conf.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_conf.h 2010-07-28 13:07:49.503598444 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_conf.h busybox-1.17.2/archival/libipkg/ipkg_conf.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_conf.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_conf.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,107 @@
+/* ipkg_conf.h - the itsy package management system
+
@@ -3244,9 +3391,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_conf.h busybox-1.17.1/archiv
+char *root_filename_alloc(ipkg_conf_t *conf, char *filename);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_configure.c busybox-1.17.1/archival/libipkg/ipkg_configure.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_configure.c 2010-07-28 13:07:49.503598444 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_configure.c busybox-1.17.2/archival/libipkg/ipkg_configure.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_configure.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_configure.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,40 @@
+/* ipkg_configure.c - the itsy package management system
+
@@ -3288,9 +3435,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_configure.c busybox-1.17.1/a
+ return 0;
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_configure.h busybox-1.17.1/archival/libipkg/ipkg_configure.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_configure.h 2010-07-28 13:07:49.503598444 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_configure.h busybox-1.17.2/archival/libipkg/ipkg_configure.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_configure.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_configure.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,25 @@
+/* ipkg_configure.h - the itsy package management system
+
@@ -3317,9 +3464,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_configure.h busybox-1.17.1/a
+int ipkg_configure(ipkg_conf_t *ipkg_conf, pkg_t *pkg);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_download.c busybox-1.17.1/archival/libipkg/ipkg_download.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_download.c 2010-07-28 13:07:49.503598444 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_download.c busybox-1.17.2/archival/libipkg/ipkg_download.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_download.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,195 @@
+/* ipkg_download.c - the itsy package management system
+
@@ -3516,9 +3663,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_download.c busybox-1.17.1/ar
+ }
+ return 0;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_download.h busybox-1.17.1/archival/libipkg/ipkg_download.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_download.h 2010-07-28 13:07:49.503598444 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_download.h busybox-1.17.2/archival/libipkg/ipkg_download.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_download.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,30 @@
+/* ipkg_download.h - the itsy package management system
+
@@ -3550,81 +3697,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_download.h busybox-1.17.1/ar
+int ipkg_prepare_url_for_install(ipkg_conf_t *conf, const char *url, char **namep);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg.h busybox-1.17.1/archival/libipkg/ipkg.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg.h 2010-07-28 13:07:49.507597557 +0200
-@@ -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.17.1.orig/archival/libipkg/ipkg_includes.h busybox-1.17.1/archival/libipkg/ipkg_includes.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_includes.h 2010-07-28 13:07:49.507597557 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_includes.h busybox-1.17.2/archival/libipkg/ipkg_includes.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_includes.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,82 @@
+#ifndef IPKG_INCLUDES_H
+#define IPKG_INCLUDES_H
@@ -3708,9 +3783,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_includes.h busybox-1.17.1/ar
+#include <mntent.h>
+
+#endif /* IPKG_INCLUDES_H */
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_install.c busybox-1.17.1/archival/libipkg/ipkg_install.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_install.c 2010-07-28 13:07:49.511600581 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_install.c busybox-1.17.2/archival/libipkg/ipkg_install.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_install.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,1982 @@
+/* ipkg_install.c - the itsy package management system
+
@@ -5694,9 +5769,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_install.c busybox-1.17.1/arc
+}
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_install.h busybox-1.17.1/archival/libipkg/ipkg_install.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_install.h 2010-07-28 13:07:49.511600581 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_install.h busybox-1.17.2/archival/libipkg/ipkg_install.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_install.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,35 @@
+/* ipkg_install.h - the itsy package management system
+
@@ -5733,9 +5808,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_install.h busybox-1.17.1/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.17.1.orig/archival/libipkg/ipkg_message.c busybox-1.17.1/archival/libipkg/ipkg_message.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_message.c 2010-07-28 13:07:49.515599694 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_message.c busybox-1.17.2/archival/libipkg/ipkg_message.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_message.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,35 @@
+/* ipkg_message.c - the itsy package management system
+
@@ -5772,9 +5847,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_message.c busybox-1.17.1/arc
+ ipkg_cb_message(conf,level,ts);
+ }
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_message.h busybox-1.17.1/archival/libipkg/ipkg_message.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_message.h 2010-07-28 13:07:49.515599694 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_message.h busybox-1.17.2/archival/libipkg/ipkg_message.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_message.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,32 @@
+/* ipkg_message.h - the itsy package management system
+
@@ -5808,9 +5883,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_message.h busybox-1.17.1/arc
+extern void ipkg_message(ipkg_conf_t *conf, message_level_t level, const char *fmt, ...);
+
+#endif /* _IPKG_MESSAGE_H_ */
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_remove.c busybox-1.17.1/archival/libipkg/ipkg_remove.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_remove.c 2010-07-28 13:07:49.515599694 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_remove.c busybox-1.17.2/archival/libipkg/ipkg_remove.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_remove.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_remove.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,385 @@
+/* ipkg_remove.c - the itsy package management system
+
@@ -6197,9 +6272,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_remove.c busybox-1.17.1/arch
+
+ return 0;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_remove.h busybox-1.17.1/archival/libipkg/ipkg_remove.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_remove.h 2010-07-28 13:07:49.515599694 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_remove.h busybox-1.17.2/archival/libipkg/ipkg_remove.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_remove.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_remove.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,33 @@
+/* ipkg_remove.h - the itsy package management system
+
@@ -6234,9 +6309,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_remove.h busybox-1.17.1/arch
+
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_upgrade.c busybox-1.17.1/archival/libipkg/ipkg_upgrade.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_upgrade.c 2010-07-28 13:07:49.515599694 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_upgrade.c busybox-1.17.2/archival/libipkg/ipkg_upgrade.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_upgrade.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,79 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6317,9 +6392,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_upgrade.c busybox-1.17.1/arc
+ new->state_flag |= SF_USER;
+ return ipkg_install_pkg(conf, new,1);
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_upgrade.h busybox-1.17.1/archival/libipkg/ipkg_upgrade.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_upgrade.h 2010-07-28 13:07:49.519597690 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_upgrade.h busybox-1.17.2/archival/libipkg/ipkg_upgrade.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_upgrade.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,18 @@
+/* ipkg_upgrade.c - the itsy package management system
+
@@ -6339,9 +6414,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_upgrade.h busybox-1.17.1/arc
+#include "ipkg.h"
+
+int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old);
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_utils.c busybox-1.17.1/archival/libipkg/ipkg_utils.c
---- busybox-1.17.1.orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_utils.c 2010-07-28 13:07:49.519597690 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_utils.c busybox-1.17.2/archival/libipkg/ipkg_utils.c
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_utils.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_utils.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,185 @@
+/* ipkg_utils.c - the itsy package management system
+
@@ -6528,9 +6603,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_utils.c busybox-1.17.1/archi
+}
+
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_utils.h busybox-1.17.1/archival/libipkg/ipkg_utils.h
---- busybox-1.17.1.orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/ipkg_utils.h 2010-07-28 13:07:49.519597690 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/ipkg_utils.h busybox-1.17.2/archival/libipkg/ipkg_utils.h
+--- busybox-1.17.2.orig/archival/libipkg/ipkg_utils.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/ipkg_utils.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,29 @@
+/* ipkg_utils.h - the itsy package management system
+
@@ -6561,73 +6636,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/ipkg_utils.h busybox-1.17.1/archi
+int line_is_blank(const char *line);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/Kbuild busybox-1.17.1/archival/libipkg/Kbuild
---- busybox-1.17.1.orig/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/Kbuild 2010-07-28 13:07:49.519597690 +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 += -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\""
-diff -Nur busybox-1.17.1.orig/archival/libipkg/libipkg.c busybox-1.17.1/archival/libipkg/libipkg.c
---- busybox-1.17.1.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/libipkg.c 2010-07-28 18:54:37.592513964 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/libipkg.c busybox-1.17.2/archival/libipkg/libipkg.c
+--- busybox-1.17.2.orig/archival/libipkg/libipkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/libipkg.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,583 @@
+/* ipkglib.c - the itsy package management system
+
@@ -7212,9 +7223,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/libipkg.c busybox-1.17.1/archival
+
+ return err;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/libipkg.h busybox-1.17.1/archival/libipkg/libipkg.h
---- busybox-1.17.1.orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/libipkg.h 2010-07-28 13:07:49.523597362 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/libipkg.h busybox-1.17.2/archival/libipkg/libipkg.h
+--- busybox-1.17.2.orig/archival/libipkg/libipkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/libipkg.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,78 @@
+/* ipkglib.h - the itsy package management system
+
@@ -7294,9 +7305,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/libipkg.h busybox-1.17.1/archival
+extern void free_error_list(struct errlist **errors);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair.c busybox-1.17.1/archival/libipkg/nv_pair.c
---- busybox-1.17.1.orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/nv_pair.c 2010-07-28 13:07:49.523597362 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/nv_pair.c busybox-1.17.2/archival/libipkg/nv_pair.c
+--- busybox-1.17.2.orig/archival/libipkg/nv_pair.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/nv_pair.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,40 @@
+/* nv_pair.c - the itsy package management system
+
@@ -7338,9 +7349,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair.c busybox-1.17.1/archival
+}
+
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair.h busybox-1.17.1/archival/libipkg/nv_pair.h
---- busybox-1.17.1.orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/nv_pair.h 2010-07-28 13:07:49.523597362 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/nv_pair.h busybox-1.17.2/archival/libipkg/nv_pair.h
+--- busybox-1.17.2.orig/archival/libipkg/nv_pair.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/nv_pair.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,32 @@
+/* nv_pair.h - the itsy package management system
+
@@ -7374,9 +7385,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair.h busybox-1.17.1/archival
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair_list.c busybox-1.17.1/archival/libipkg/nv_pair_list.c
---- busybox-1.17.1.orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/nv_pair_list.c 2010-07-28 13:07:49.523597362 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/nv_pair_list.c busybox-1.17.2/archival/libipkg/nv_pair_list.c
+--- busybox-1.17.2.orig/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/nv_pair_list.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,98 @@
+/* nv_pair_list.c - the itsy package management system
+
@@ -7476,9 +7487,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair_list.c busybox-1.17.1/arc
+ }
+ return NULL;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair_list.h busybox-1.17.1/archival/libipkg/nv_pair_list.h
---- busybox-1.17.1.orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/nv_pair_list.h 2010-07-28 13:07:49.523597362 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/nv_pair_list.h busybox-1.17.2/archival/libipkg/nv_pair_list.h
+--- busybox-1.17.2.orig/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/nv_pair_list.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,60 @@
+/* nv_pair_list.h - the itsy package management system
+
@@ -7540,9 +7551,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/nv_pair_list.h busybox-1.17.1/arc
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg.c busybox-1.17.1/archival/libipkg/pkg.c
---- busybox-1.17.1.orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg.c 2010-07-28 13:07:49.543596278 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg.c busybox-1.17.2/archival/libipkg/pkg.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,1757 @@
+/* pkg.c - the itsy package management system
+
@@ -9301,9 +9312,242 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg.c busybox-1.17.1/archival/lib
+ }
+ return 0;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_depends.c busybox-1.17.1/archival/libipkg/pkg_depends.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_depends.c 2010-07-28 13:07:49.547597626 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg.h busybox-1.17.2/archival/libipkg/pkg.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg.h 2010-12-01 22:25:23.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.17.2.orig/archival/libipkg/pkg_depends.c busybox-1.17.2/archival/libipkg/pkg_depends.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_depends.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_depends.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,1032 @@
+/* pkg_depends.c - the itsy package management system
+
@@ -10337,9 +10581,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_depends.c busybox-1.17.1/arch
+
+ return 0;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_depends.h busybox-1.17.1/archival/libipkg/pkg_depends.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_depends.h 2010-07-28 13:07:49.547597626 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_depends.h busybox-1.17.2/archival/libipkg/pkg_depends.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_depends.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_depends.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,105 @@
+/* pkg_depends.h - the itsy package management system
+
@@ -10446,9 +10690,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_depends.h busybox-1.17.1/arch
+int pkg_dependence_satisfied(depend_t *depend);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest.c busybox-1.17.1/archival/libipkg/pkg_dest.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_dest.c 2010-07-28 13:07:49.551597019 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_dest.c busybox-1.17.2/archival/libipkg/pkg_dest.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_dest.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_dest.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,92 @@
+/* pkg_dest.c - the itsy package management system
+
@@ -10542,9 +10786,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest.c busybox-1.17.1/archiva
+
+ dest->root_dir = NULL;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest.h busybox-1.17.1/archival/libipkg/pkg_dest.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_dest.h 2010-07-28 13:07:49.551597019 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_dest.h busybox-1.17.2/archival/libipkg/pkg_dest.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_dest.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_dest.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,38 @@
+/* pkg_dest.h - the itsy package management system
+
@@ -10584,9 +10828,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest.h busybox-1.17.1/archiva
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest_list.c busybox-1.17.1/archival/libipkg/pkg_dest_list.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_dest_list.c 2010-07-28 13:07:49.551597019 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_dest_list.c busybox-1.17.2/archival/libipkg/pkg_dest_list.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_dest_list.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,85 @@
+/* pkg_dest_list.c - the itsy package management system
+
@@ -10673,9 +10917,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest_list.c busybox-1.17.1/ar
+{
+ return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list);
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest_list.h busybox-1.17.1/archival/libipkg/pkg_dest_list.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_dest_list.h 2010-07-28 13:07:49.551597019 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_dest_list.h busybox-1.17.2/archival/libipkg/pkg_dest_list.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_dest_list.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,50 @@
+/* pkg_dest_list.h - the itsy package management system
+
@@ -10727,9 +10971,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_dest_list.h busybox-1.17.1/ar
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_extract.c busybox-1.17.1/archival/libipkg/pkg_extract.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_extract.c 2010-07-28 13:07:49.555597807 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_extract.c busybox-1.17.2/archival/libipkg/pkg_extract.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_extract.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_extract.c 2010-12-01 22:27:00.000000000 +0100
@@ -0,0 +1,255 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -10834,7 +11078,7 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_extract.c busybox-1.17.1/arch
+{
+ archive_handle_t *archive;
+ char *name;
-+ const char *filename = "./" IPKG_CONTROL_FILE;
++ const char *filename = IPKG_CONTROL_FILE;
+
+ extract_ipkg_file_to_dir(pkg, global_conf->tmp_dir, "./" IPKG_CONTROL_ARCHIVE);
+ sprintf_alloc(&name, "%s/%s", global_conf->tmp_dir, IPKG_CONTROL_ARCHIVE);
@@ -10986,9 +11230,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_extract.c busybox-1.17.1/arch
+
+ return 0;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_extract.h busybox-1.17.1/archival/libipkg/pkg_extract.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_extract.h 2010-07-28 13:07:49.555597807 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_extract.h busybox-1.17.2/archival/libipkg/pkg_extract.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_extract.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_extract.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,32 @@
+/* pkg_extract.c - the itsy package management system
+
@@ -11022,242 +11266,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_extract.h busybox-1.17.1/arch
+int pkg_extract_data_file_names_to_stream(pkg_t *pkg, FILE *file);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg.h busybox-1.17.1/archival/libipkg/pkg.h
---- busybox-1.17.1.orig/archival/libipkg/pkg.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg.h 2010-07-28 13:07:49.555597807 +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.17.1.orig/archival/libipkg/pkg_hash.c busybox-1.17.1/archival/libipkg/pkg_hash.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_hash.c 2010-07-28 13:07:49.555597807 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_hash.c busybox-1.17.2/archival/libipkg/pkg_hash.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_hash.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_hash.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,623 @@
+/* ipkg_hash.c - the itsy package management system
+
@@ -11882,9 +11893,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_hash.c busybox-1.17.1/archiva
+}
+
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_hash.h busybox-1.17.1/archival/libipkg/pkg_hash.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_hash.h 2010-07-28 13:07:49.563598547 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_hash.h busybox-1.17.2/archival/libipkg/pkg_hash.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_hash.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_hash.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,61 @@
+/* pkg_hash.h - the itsy package management system
+
@@ -11947,9 +11958,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_hash.h busybox-1.17.1/archiva
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_parse.c busybox-1.17.1/archival/libipkg/pkg_parse.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_parse.c 2010-07-28 13:07:49.603597497 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_parse.c busybox-1.17.2/archival/libipkg/pkg_parse.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_parse.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_parse.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,368 @@
+/* pkg_parse.c - the itsy package management system
+
@@ -12319,9 +12330,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_parse.c busybox-1.17.1/archiv
+
+ return 0;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_parse.h busybox-1.17.1/archival/libipkg/pkg_parse.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_parse.h 2010-07-28 13:07:49.607598006 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_parse.h busybox-1.17.2/archival/libipkg/pkg_parse.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_parse.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_parse.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,31 @@
+/* pkg_parse.h - the itsy package management system
+
@@ -12354,9 +12365,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_parse.h busybox-1.17.1/archiv
+int pkg_valorize_other_field(pkg_t *pkg, char ***raw);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src.c busybox-1.17.1/archival/libipkg/pkg_src.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_src.c 2010-07-28 13:07:49.607598006 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_src.c busybox-1.17.2/archival/libipkg/pkg_src.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_src.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_src.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,43 @@
+/* pkg_src.c - the itsy package management system
+
@@ -12401,9 +12412,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src.c busybox-1.17.1/archival
+}
+
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src.h busybox-1.17.1/archival/libipkg/pkg_src.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_src.h 2010-07-28 13:07:49.611599074 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_src.h busybox-1.17.2/archival/libipkg/pkg_src.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_src.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_src.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,34 @@
+/* pkg_src.h - the itsy package management system
+
@@ -12439,9 +12450,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src.h busybox-1.17.1/archival
+void pkg_src_deinit(pkg_src_t *src);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src_list.c busybox-1.17.1/archival/libipkg/pkg_src_list.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_src_list.c 2010-07-28 13:07:49.611599074 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_src_list.c busybox-1.17.2/archival/libipkg/pkg_src_list.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_src_list.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,75 @@
+/* pkg_src_list.c - the itsy package management system
+
@@ -12518,9 +12529,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src_list.c busybox-1.17.1/arc
+{
+ return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list);
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src_list.h busybox-1.17.1/archival/libipkg/pkg_src_list.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_src_list.h 2010-07-28 13:07:49.660190465 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_src_list.h busybox-1.17.2/archival/libipkg/pkg_src_list.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_src_list.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,57 @@
+/* pkg_src_list.h - the itsy package management system
+
@@ -12579,9 +12590,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_src_list.h busybox-1.17.1/arc
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_vec.c busybox-1.17.1/archival/libipkg/pkg_vec.c
---- busybox-1.17.1.orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_vec.c 2010-07-28 13:07:49.660190465 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_vec.c busybox-1.17.2/archival/libipkg/pkg_vec.c
+--- busybox-1.17.2.orig/archival/libipkg/pkg_vec.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_vec.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,231 @@
+/* pkg_vec.c - the itsy package management system
+
@@ -12814,9 +12825,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_vec.c busybox-1.17.1/archival
+ qsort(vec->pkgs, vec->len, sizeof(pkg_t *), (compare_fcn_t)compar);
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_vec.h busybox-1.17.1/archival/libipkg/pkg_vec.h
---- busybox-1.17.1.orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/pkg_vec.h 2010-07-28 13:07:49.663598721 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/pkg_vec.h busybox-1.17.2/archival/libipkg/pkg_vec.h
+--- busybox-1.17.2.orig/archival/libipkg/pkg_vec.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/pkg_vec.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,62 @@
+/* pkg_vec.h - the itsy package management system
+
@@ -12880,9 +12891,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/pkg_vec.h busybox-1.17.1/archival
+void abstract_pkg_vec_sort(pkg_vec_t *vec, int (*compar)(abstract_pkg_t *, abstract_pkg_t *));
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/sprintf_alloc.h busybox-1.17.1/archival/libipkg/sprintf_alloc.h
---- busybox-1.17.1.orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/sprintf_alloc.h 2010-07-28 13:07:49.663598721 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/sprintf_alloc.h busybox-1.17.2/archival/libipkg/sprintf_alloc.h
+--- busybox-1.17.2.orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/sprintf_alloc.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,25 @@
+/* sprintf_alloca.c -- like sprintf with memory allocation
+
@@ -12909,9 +12920,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/sprintf_alloc.h busybox-1.17.1/ar
+#define sprintf_alloc(str, fmt, args...) *str = xasprintf(fmt, ## args)
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/str_list.c busybox-1.17.1/archival/libipkg/str_list.c
---- busybox-1.17.1.orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/str_list.c 2010-07-28 13:07:49.667598672 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/str_list.c busybox-1.17.2/archival/libipkg/str_list.c
+--- busybox-1.17.2.orig/archival/libipkg/str_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/str_list.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,76 @@
+/* str_list.c - the itsy package management system
+
@@ -12989,9 +13000,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/str_list.c busybox-1.17.1/archiva
+ (void *)target_str,
+ (void_list_cmp_t)strcmp);
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/str_list.h busybox-1.17.1/archival/libipkg/str_list.h
---- busybox-1.17.1.orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/str_list.h 2010-07-28 13:07:49.667598672 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/str_list.h busybox-1.17.2/archival/libipkg/str_list.h
+--- busybox-1.17.2.orig/archival/libipkg/str_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/str_list.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,51 @@
+/* str_list.h - the itsy package management system
+
@@ -13044,9 +13055,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/str_list.h busybox-1.17.1/archiva
+char *str_list_remove_elt(str_list_t *list, const char *target_str);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/str_util.c busybox-1.17.1/archival/libipkg/str_util.c
---- busybox-1.17.1.orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/str_util.c 2010-07-28 13:07:49.671598344 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/str_util.c busybox-1.17.2/archival/libipkg/str_util.c
+--- busybox-1.17.2.orig/archival/libipkg/str_util.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/str_util.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,69 @@
+/* str_utils.c - the itsy package management system
+
@@ -13117,9 +13128,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/str_util.c busybox-1.17.1/archiva
+ return str ? strdup(str) : NULL;
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/str_util.h busybox-1.17.1/archival/libipkg/str_util.h
---- busybox-1.17.1.orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/str_util.h 2010-07-28 13:07:49.671598344 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/str_util.h busybox-1.17.2/archival/libipkg/str_util.h
+--- busybox-1.17.2.orig/archival/libipkg/str_util.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/str_util.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,27 @@
+/* str_utils.h - the itsy package management system
+
@@ -13148,9 +13159,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/str_util.h busybox-1.17.1/archiva
+char *str_dup_safe(const char *str);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/user.c busybox-1.17.1/archival/libipkg/user.c
---- busybox-1.17.1.orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/user.c 2010-07-28 13:07:49.671598344 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/user.c busybox-1.17.2/archival/libipkg/user.c
+--- busybox-1.17.2.orig/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/user.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,49 @@
+/* user.c - the itsy package management system
+
@@ -13201,9 +13212,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/user.c busybox-1.17.1/archival/li
+
+ return response;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/user.h busybox-1.17.1/archival/libipkg/user.h
---- busybox-1.17.1.orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/user.h 2010-07-28 13:07:49.675598296 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/user.h busybox-1.17.2/archival/libipkg/user.h
+--- busybox-1.17.2.orig/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/user.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,23 @@
+/* user.c - the itsy package management system
+
@@ -13228,9 +13239,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/user.h busybox-1.17.1/archival/li
+
+char *get_user_response(const char *format, ...);
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/void_list.c busybox-1.17.1/archival/libipkg/void_list.c
---- busybox-1.17.1.orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/void_list.c 2010-07-28 13:07:49.675598296 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/void_list.c busybox-1.17.2/archival/libipkg/void_list.c
+--- busybox-1.17.2.orig/archival/libipkg/void_list.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/void_list.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,194 @@
+/* void_list.c - the itsy package management system
+
@@ -13426,9 +13437,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/void_list.c busybox-1.17.1/archiv
+ else
+ return NULL;
+}
-diff -Nur busybox-1.17.1.orig/archival/libipkg/void_list.h busybox-1.17.1/archival/libipkg/void_list.h
---- busybox-1.17.1.orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/void_list.h 2010-07-28 13:07:49.675598296 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/void_list.h busybox-1.17.2/archival/libipkg/void_list.h
+--- busybox-1.17.2.orig/archival/libipkg/void_list.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/void_list.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,59 @@
+/* void_list.h - the itsy package management system
+
@@ -13489,9 +13500,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/void_list.h busybox-1.17.1/archiv
+void *void_list_remove_elt(void_list_t *list, const void *target_data, void_list_cmp_t cmp);
+
+#endif
-diff -Nur busybox-1.17.1.orig/archival/libipkg/xsystem.c busybox-1.17.1/archival/libipkg/xsystem.c
---- busybox-1.17.1.orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/xsystem.c 2010-07-28 13:07:49.675598296 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/xsystem.c busybox-1.17.2/archival/libipkg/xsystem.c
+--- busybox-1.17.2.orig/archival/libipkg/xsystem.c 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/xsystem.c 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,64 @@
+/* xsystem.c - system(3) with error messages
+
@@ -13557,9 +13568,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/xsystem.c busybox-1.17.1/archival
+ return -1;
+}
+
-diff -Nur busybox-1.17.1.orig/archival/libipkg/xsystem.h busybox-1.17.1/archival/libipkg/xsystem.h
---- busybox-1.17.1.orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
-+++ busybox-1.17.1/archival/libipkg/xsystem.h 2010-07-28 13:07:49.675598296 +0200
+diff -Nur busybox-1.17.2.orig/archival/libipkg/xsystem.h busybox-1.17.2/archival/libipkg/xsystem.h
+--- busybox-1.17.2.orig/archival/libipkg/xsystem.h 1970-01-01 01:00:00.000000000 +0100
++++ busybox-1.17.2/archival/libipkg/xsystem.h 2010-12-01 22:25:23.000000000 +0100
@@ -0,0 +1,34 @@
+/* xsystem.h - system(3) with error messages
+
@@ -13595,9 +13606,9 @@ diff -Nur busybox-1.17.1.orig/archival/libipkg/xsystem.h busybox-1.17.1/archival
+
+#endif
+
-diff -Nur busybox-1.17.1.orig/archival/libunarchive/Kbuild.src busybox-1.17.1/archival/libunarchive/Kbuild.src
---- busybox-1.17.1.orig/archival/libunarchive/Kbuild.src 2010-07-06 04:25:53.000000000 +0200
-+++ busybox-1.17.1/archival/libunarchive/Kbuild.src 2010-07-28 13:07:49.675598296 +0200
+diff -Nur busybox-1.17.2.orig/archival/libunarchive/Kbuild.src busybox-1.17.2/archival/libunarchive/Kbuild.src
+--- busybox-1.17.2.orig/archival/libunarchive/Kbuild.src 2010-08-23 02:44:35.000000000 +0200
++++ busybox-1.17.2/archival/libunarchive/Kbuild.src 2010-12-01 22:25:23.000000000 +0100
@@ -43,6 +43,7 @@
lib-$(CONFIG_DPKG) += $(DPKG_FILES)
lib-$(CONFIG_DPKG_DEB) += $(DPKG_FILES)
@@ -13606,9 +13617,9 @@ diff -Nur busybox-1.17.1.orig/archival/libunarchive/Kbuild.src busybox-1.17.1/ar
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.17.1.orig/include/applets.src.h busybox-1.17.1/include/applets.src.h
---- busybox-1.17.1.orig/include/applets.src.h 2010-07-25 00:12:43.000000000 +0200
-+++ busybox-1.17.1/include/applets.src.h 2010-07-28 13:07:49.679607187 +0200
+diff -Nur busybox-1.17.2.orig/include/applets.src.h busybox-1.17.2/include/applets.src.h
+--- busybox-1.17.2.orig/include/applets.src.h 2010-08-23 02:44:35.000000000 +0200
++++ busybox-1.17.2/include/applets.src.h 2010-12-01 22:25:23.000000000 +0100
@@ -209,6 +209,7 @@
IF_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_DROP))
IF_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE))
@@ -13617,9 +13628,9 @@ diff -Nur busybox-1.17.1.orig/include/applets.src.h busybox-1.17.1/include/apple
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.17.1.orig/include/unarchive.h busybox-1.17.1/include/unarchive.h
---- busybox-1.17.1.orig/include/unarchive.h 2010-07-06 04:25:54.000000000 +0200
-+++ busybox-1.17.1/include/unarchive.h 2010-07-28 13:07:49.679607187 +0200
+diff -Nur busybox-1.17.2.orig/include/unarchive.h busybox-1.17.2/include/unarchive.h
+--- busybox-1.17.2.orig/include/unarchive.h 2010-08-22 10:21:38.000000000 +0200
++++ busybox-1.17.2/include/unarchive.h 2010-12-01 22:25:23.000000000 +0100
@@ -76,7 +76,7 @@
off_t offset;
@@ -13638,9 +13649,9 @@ diff -Nur busybox-1.17.1.orig/include/unarchive.h busybox-1.17.1/include/unarchi
/* Temporary storage */
char *dpkg__buffer;
/* How to process any sub archive, e.g. get_header_tar_gz */
-diff -Nur busybox-1.17.1.orig/include/usage.src.h busybox-1.17.1/include/usage.src.h
---- busybox-1.17.1.orig/include/usage.src.h 2010-07-25 00:12:43.000000000 +0200
-+++ busybox-1.17.1/include/usage.src.h 2010-07-28 13:07:49.683599037 +0200
+diff -Nur busybox-1.17.2.orig/include/usage.src.h busybox-1.17.2/include/usage.src.h
+--- busybox-1.17.2.orig/include/usage.src.h 2010-08-23 02:44:35.000000000 +0200
++++ busybox-1.17.2/include/usage.src.h 2010-12-01 22:25:23.000000000 +0100
@@ -1556,6 +1556,82 @@
"$ ls -la /tmp/busybox*\n" \
"-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
@@ -13724,14 +13735,3 @@ diff -Nur busybox-1.17.1.orig/include/usage.src.h busybox-1.17.1/include/usage.s
#define halt_trivial_usage \
"[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
#define halt_full_usage "\n\n" \
-diff -Nur busybox-1.17.1.orig/Makefile busybox-1.17.1/Makefile
---- busybox-1.17.1.orig/Makefile 2010-07-25 00:13:44.000000000 +0200
-+++ busybox-1.17.1/Makefile 2010-07-28 13:07:49.683599037 +0200
-@@ -459,6 +459,7 @@
-
- libs-y := \
- archival/ \
-+ archival/libipkg/ \
- archival/libunarchive/ \
- console-tools/ \
- coreutils/ \
diff --git a/package/pm-utils/Makefile b/package/pm-utils/Makefile
new file mode 100644
index 000000000..1ac1431dd
--- /dev/null
+++ b/package/pm-utils/Makefile
@@ -0,0 +1,29 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= pm-utils
+PKG_VERSION:= 1.4.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 1742a556089c36c3a89eb1b957da5a60
+PKG_DESCR:= Power Management Utilities
+PKG_SECTION:= utils
+PKG_URL:= http://pm-utils.freedesktop.org/
+PKG_SITES:= http://pm-utils.freedesktop.org/releases/
+
+PKG_CFLINE_PM_UTILS:= select BUSYBOX_FLOCK
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PM_UTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_PM_UTILS)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/pm-utils \
+ $(IDIR_PM_UTILS)/usr/lib
+ $(INSTALL_DIR) $(IDIR_PM_UTILS)/usr/sbin
+ $(CP) $(WRKINST)/usr/sbin/pm-* \
+ $(IDIR_PM_UTILS)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk