[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#168499: dpkg: --no-act laxness just begging for trouble

Package: dpkg
Version: 1.9.21
Severity: important

Gentlemen, in man dpkg
              Be  sure to give --no-act before the action-parame-
              ter, or you might end up with undesirable  results.
              (e.g.   dpkg  --purge foo --no-act will first purge
              package foo and then try to purge package --no-act,
              even though you probably expected it to actually do

So one ends up purging a critical item by mistake.
Indeed at a remote lab one could not recover without the .deb.
And I think 99% of the users were expecting --no-act to act on the
entire line, not some special fancy use.

You must admit that you are just setting up a trap when
dpkg --help
just casually mentions --no-act without an accompanying warning.
Do you plan to blame the user for not reading the man page after the

Therefore, if you intend to mention --no-act anywhere without its
accompanying warning, then you should rewrite your command parser to
make it effective for the whole line if it appears anywhere on the line.

And by the way, what good is --no-act if I can't see on this run:

# dpkg --no-act -i  tubesock_0.2+20021011-1_i386.deb
(Reading database ... 143537 files and directories currently installed.)
Preparing to replace tubesock 0.2+20021011-1 (using
tubesock_0.2+20021011-1_i386.deb) ...

what I have to do a real run to see:

# dpkg -i  tubesock_0.2+20021011-1_i386.deb
Selecting previously deselected package tubesock.
(Reading database ... 143523 files and directories currently installed.)
Unpacking tubesock (from tubesock_0.2+20021011-1_i386.deb) ...
dpkg: dependency problems prevent configuration of tubesock:
 tubesock depends on libatk1.0-0 (>= 1.0.3); however:
  Package libatk1.0-0 is not installed.
 tubesock depends on libc6 (>= 2.2.5-13); however:
  Version of libc6 on system is 2.2.5-6.
 tubesock depends on libglib2.0-0 (>= 2.0.6); however:
  Package libglib2.0-0 is not installed.
 tubesock depends on libgtk2.0-0 (>= 2.0.6); however:
  Package libgtk2.0-0 is not installed.
 tubesock depends on libpango1.0-0 (>= 1.0.4); however:
  Package libpango1.0-0 is not installed.
dpkg: error processing tubesock (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux debian 2.4.18-k7 #1 Sun Apr 14 13:19:11 EST 2002 i686
Locale: LANG=zh_TW.Big5, LC_CTYPE=zh_TW.Big5

Versions of packages dpkg depends on:
ii  libc6                    2.2.5-6         GNU C Library: Shared libraries an
ii  libncurses5              5.2.20020112a-7 Shared libraries for terminal hand
ii  libstdc++2.10-glibc2.2   1:2.95.4-7      The GNU stdc++ library

Reply to: