> > This patch changes how dpkg handles config files. There are three
> > modes:
> 
> Applied with some editing.
> 
> Please test (I mean it!) current git.

It seems to work, expect this one small thing:

BusyBox 1.6.0 was:

  [r...@ysi5 obex]$ dpkg -i
  dpkg: no package files specified

  [r...@ysi5 obex]$ dpkg -F depends foo
  Segmentation fault

Current git is:

  [r...@ysi5 obex]$ ./dpkg -i
  Usage: dpkg [-ilCPru] [-F OPT] PACKAGE

  [r...@ysi5 obex]$ ./dpkg -F depends foo
  Segmentation fault

With attached patch:

  [r...@ysi5 obex]$ ./dpkg -i
  dpkg: no package files specified

  [r...@ysi5 obex]$ ./dpkg -F depends foo
  Usage: dpkg [-ilCPru] [-F OPT] PACKAGE


Signed-off-by: Kim B. Heino <[email protected]>


--- b/archival/dpkg.c   2010-03-29 15:18:27.000000000 +0300
+++ busybox-param/archival/dpkg.c       2010-03-30 13:57:41.612422708 +0300
@@ -1734,8 +1734,8 @@
        //if (opt & OPT_remove) ... // -r
        //if (opt & OPT_unpack) ... // -u (--unpack in official dpkg)
        argv += optind;
-       /* check for non-option argument if expected  */
-       if (!opt || (!argv[0] && !(opt & OPT_list_installed)))
+       /* check for command argument */
+       if (!(opt & (OPT_configure | OPT_install | OPT_list_installed | 
OPT_purge | OPT_remove | OPT_unpack)))
                bb_show_usage();
 
 /*     puts("(Reading database ... xxxxx files and directories installed.)"); 
*/
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to