summaryrefslogtreecommitdiff
path: root/archival/dpkg_deb.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-02-12 11:16:26 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-02-12 11:16:26 +0000
commit821fbf0f42f8b2dc214470a18217e935e3608ca6 (patch)
tree0c75619fc63850446969c5a58ab04fe6dfe69947 /archival/dpkg_deb.c
parentbc9afadecd96881567ea9b66c9c7d390592716fe (diff)
downloadbusybox-w32-821fbf0f42f8b2dc214470a18217e935e3608ca6.tar.gz
busybox-w32-821fbf0f42f8b2dc214470a18217e935e3608ca6.tar.bz2
busybox-w32-821fbf0f42f8b2dc214470a18217e935e3608ca6.zip
New option 'list' produces output that can be used for the packages .list file.
Will be used be bb dpkg
Diffstat (limited to 'archival/dpkg_deb.c')
-rw-r--r--archival/dpkg_deb.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 32ef4ca75..aed0ba368 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -42,11 +42,12 @@ extern int tar_unzip_init(int tarFd);
42extern int readTarFile(int tarFd, int extractFlag, int listFlag, 42extern int readTarFile(int tarFd, int extractFlag, int listFlag,
43 int tostdoutFlag, int verboseFlag, char** extractList, char** excludeList); 43 int tostdoutFlag, int verboseFlag, char** extractList, char** excludeList);
44 44
45const int dpkg_deb_contents = 1; 45static const int dpkg_deb_contents = 1;
46const int dpkg_deb_control = 2; 46static const int dpkg_deb_control = 2;
47// const int dpkg_deb_info = 4; 47// const int dpkg_deb_info = 4;
48const int dpkg_deb_extract = 8; 48static const int dpkg_deb_extract = 8;
49const int dpkg_deb_verbose_extract = 16; 49static const int dpkg_deb_verbose_extract = 16;
50static const int dpkg_deb_list = 32;
50 51
51extern int deb_extract(int optflags, const char *dir_name, const char *deb_filename) 52extern int deb_extract(int optflags, const char *dir_name, const char *deb_filename)
52{ 53{
@@ -65,6 +66,10 @@ extern int deb_extract(int optflags, const char *dir_name, const char *deb_filen
65 verbose_flag = TRUE; 66 verbose_flag = TRUE;
66 list_flag = TRUE; 67 list_flag = TRUE;
67 } 68 }
69 if (dpkg_deb_list == (dpkg_deb_list & optflags)) {
70 strcpy(ar_filename, "data.tar.gz");
71 list_flag = TRUE;
72 }
68 if (dpkg_deb_control == (dpkg_deb_control & optflags)) { 73 if (dpkg_deb_control == (dpkg_deb_control & optflags)) {
69 strcpy(ar_filename, "control.tar.gz"); 74 strcpy(ar_filename, "control.tar.gz");
70 extract_flag = TRUE; 75 extract_flag = TRUE;
@@ -114,7 +119,7 @@ extern int dpkg_deb_main(int argc, char **argv)
114 int opt = 0; 119 int opt = 0;
115 int optflag = 0; 120 int optflag = 0;
116 121
117 while ((opt = getopt(argc, argv, "cexX")) != -1) { 122 while ((opt = getopt(argc, argv, "cexXl")) != -1) {
118 switch (opt) { 123 switch (opt) {
119 case 'c': 124 case 'c':
120 optflag |= dpkg_deb_contents; 125 optflag |= dpkg_deb_contents;
@@ -128,6 +133,9 @@ extern int dpkg_deb_main(int argc, char **argv)
128 case 'x': 133 case 'x':
129 optflag |= dpkg_deb_extract; 134 optflag |= dpkg_deb_extract;
130 break; 135 break;
136 case 'l':
137 optflag |= dpkg_deb_list;
138 break;
131/* case 'I': 139/* case 'I':
132 optflag |= dpkg_deb_info; 140 optflag |= dpkg_deb_info;
133 break; 141 break;