New option 'list' produces output that can be used for the packages .list file.
Will be used be bb dpkg
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 32ef4ca..aed0ba3 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -42,11 +42,12 @@
extern int readTarFile(int tarFd, int extractFlag, int listFlag,
int tostdoutFlag, int verboseFlag, char** extractList, char** excludeList);
-const int dpkg_deb_contents = 1;
-const int dpkg_deb_control = 2;
+static const int dpkg_deb_contents = 1;
+static const int dpkg_deb_control = 2;
// const int dpkg_deb_info = 4;
-const int dpkg_deb_extract = 8;
-const int dpkg_deb_verbose_extract = 16;
+static const int dpkg_deb_extract = 8;
+static const int dpkg_deb_verbose_extract = 16;
+static const int dpkg_deb_list = 32;
extern int deb_extract(int optflags, const char *dir_name, const char *deb_filename)
{
@@ -65,6 +66,10 @@
verbose_flag = TRUE;
list_flag = TRUE;
}
+ if (dpkg_deb_list == (dpkg_deb_list & optflags)) {
+ strcpy(ar_filename, "data.tar.gz");
+ list_flag = TRUE;
+ }
if (dpkg_deb_control == (dpkg_deb_control & optflags)) {
strcpy(ar_filename, "control.tar.gz");
extract_flag = TRUE;
@@ -114,7 +119,7 @@
int opt = 0;
int optflag = 0;
- while ((opt = getopt(argc, argv, "cexX")) != -1) {
+ while ((opt = getopt(argc, argv, "cexXl")) != -1) {
switch (opt) {
case 'c':
optflag |= dpkg_deb_contents;
@@ -128,6 +133,9 @@
case 'x':
optflag |= dpkg_deb_extract;
break;
+ case 'l':
+ optflag |= dpkg_deb_list;
+ break;
/* case 'I':
optflag |= dpkg_deb_info;
break;
diff --git a/dpkg_deb.c b/dpkg_deb.c
index 32ef4ca..aed0ba3 100644
--- a/dpkg_deb.c
+++ b/dpkg_deb.c
@@ -42,11 +42,12 @@
extern int readTarFile(int tarFd, int extractFlag, int listFlag,
int tostdoutFlag, int verboseFlag, char** extractList, char** excludeList);
-const int dpkg_deb_contents = 1;
-const int dpkg_deb_control = 2;
+static const int dpkg_deb_contents = 1;
+static const int dpkg_deb_control = 2;
// const int dpkg_deb_info = 4;
-const int dpkg_deb_extract = 8;
-const int dpkg_deb_verbose_extract = 16;
+static const int dpkg_deb_extract = 8;
+static const int dpkg_deb_verbose_extract = 16;
+static const int dpkg_deb_list = 32;
extern int deb_extract(int optflags, const char *dir_name, const char *deb_filename)
{
@@ -65,6 +66,10 @@
verbose_flag = TRUE;
list_flag = TRUE;
}
+ if (dpkg_deb_list == (dpkg_deb_list & optflags)) {
+ strcpy(ar_filename, "data.tar.gz");
+ list_flag = TRUE;
+ }
if (dpkg_deb_control == (dpkg_deb_control & optflags)) {
strcpy(ar_filename, "control.tar.gz");
extract_flag = TRUE;
@@ -114,7 +119,7 @@
int opt = 0;
int optflag = 0;
- while ((opt = getopt(argc, argv, "cexX")) != -1) {
+ while ((opt = getopt(argc, argv, "cexXl")) != -1) {
switch (opt) {
case 'c':
optflag |= dpkg_deb_contents;
@@ -128,6 +133,9 @@
case 'x':
optflag |= dpkg_deb_extract;
break;
+ case 'l':
+ optflag |= dpkg_deb_list;
+ break;
/* case 'I':
optflag |= dpkg_deb_info;
break;