applying fix for:
authorpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Fri, 22 Jul 2005 13:17:41 +0000 (13:17 +0000)
committerpgf <pgf@69ca8d6d-28ef-0310-b511-8ec308f3f277>
Fri, 22 Jul 2005 13:17:41 +0000 (13:17 +0000)
     0000093: Patch for dpkg - can't handle scripts
      Attached patch is needed to fix dpkg's support for preinst,
       postinst etc script files.

git-svn-id: svn://busybox.net/trunk/busybox@10900 69ca8d6d-28ef-0310-b511-8ec308f3f277

archival/dpkg.c

index 05ba434..8944657 100644 (file)
@@ -1520,6 +1520,7 @@ static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, lli
 {
        ar_handle->sub_archive->action_data = data_extract_to_buffer;
        ar_handle->sub_archive->accept = myaccept;
+       ar_handle->sub_archive->filter = filter_accept_list;
 
        unpack_ar_archive(ar_handle);
        close(ar_handle->src_fd);
@@ -1714,6 +1715,7 @@ int dpkg_main(int argc, char **argv)
 
                        if (package_num == -1) {
                                bb_error_msg("Invalid control file in %s", argv[optind]);
+                                optind++;
                                continue;
                        }
                        deb_file[deb_count]->package = (unsigned int) package_num;