aboutsummaryrefslogtreecommitdiff
path: root/archival/dpkg.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-05 03:14:39 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-05 03:14:39 +0000
commit01d0083a639d6b91298c62b9e67b803fe9b9a36d (patch)
tree87f705b9e4e4e48700ac61e9538c637ae2b395a7 /archival/dpkg.c
parentea8519ec8a9e6807e16ca3a138d22201d35b273b (diff)
downloadbusybox-w32-01d0083a639d6b91298c62b9e67b803fe9b9a36d.tar.gz
busybox-w32-01d0083a639d6b91298c62b9e67b803fe9b9a36d.tar.bz2
busybox-w32-01d0083a639d6b91298c62b9e67b803fe9b9a36d.zip
A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can handle them sanely and all at once. -Erik git-svn-id: svn://busybox.net/trunk/busybox@2250 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival/dpkg.c')
-rw-r--r--archival/dpkg.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index d65081715..dc0b23e8e 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -12,14 +12,6 @@
12#include "busybox.h" 12#include "busybox.h"
13 13
14 14
15/* Stupid libc doesn't have a reliable way for use to know
16 * that libc5 is being used. Assume this is good enough */
17#if !defined __GLIBC__ && !defined __UCLIBC__
18#error It looks like you are using libc5, which does not support
19#error tfind(). tfind() is used by busybox dpkg.
20#error Please disable BB_DPKG. Sorry.
21#endif
22
23#define DEPENDSMAX 64 /* maximum number of depends we can handle */ 15#define DEPENDSMAX 64 /* maximum number of depends we can handle */
24 16
25/* Should we do full dependency checking? */ 17/* Should we do full dependency checking? */
@@ -591,6 +583,7 @@ static int dpkg_dounpack(package_t *pkg)
591 char *adminscripts[] = { "/prerm", "/postrm", "/preinst", "/postinst", 583 char *adminscripts[] = { "/prerm", "/postrm", "/preinst", "/postinst",
592 "/conffiles", "/md5sums", "/shlibs", "/templates" }; 584 "/conffiles", "/md5sums", "/shlibs", "/templates" };
593 char buf[1024], buf2[1024]; 585 char buf[1024], buf2[1024];
586 FILE *myfile = stdout;
594 587
595 DPRINTF("Unpacking %s\n", pkg->package); 588 DPRINTF("Unpacking %s\n", pkg->package);
596 589
@@ -622,9 +615,9 @@ static int dpkg_dounpack(package_t *pkg)
622 strcpy(lst_file, infodir); 615 strcpy(lst_file, infodir);
623 strcat(lst_file, pkg->package); 616 strcat(lst_file, pkg->package);
624 strcat(lst_file, ".list"); 617 strcat(lst_file, ".list");
625 outfp = freopen(lst_file, "w", stdout); 618 outfp = freopen(lst_file, "w", myfile);
626 deb_extract(dpkg_deb_list, NULL, pkg->file); 619 deb_extract(dpkg_deb_list, NULL, pkg->file);
627 stdout = freopen(NULL, "w", outfp); 620 myfile = freopen(NULL, "w", outfp);
628 621
629 printf("done\n"); 622 printf("done\n");
630 getchar(); 623 getchar();