Bug#764673: dpkg: --dry-run --set-selections perform real actions

2014-10-10 Thread ygrex
Package: dpkg
Version: 1.17.16
Severity: normal

Dear Maintainer,

if one tries to perform --dry-run --set-selections for some reason,
real actions will take effect in contradiction to the manpage:


Do  everything  which is supposed to be done, but don't write any changes.


here is an example:

# dpkg --get-selections | head -n1
acl install

# dpkg --get-selections | head -n1 | sed -r 's/\binstall$/purge/' | dpkg 
--dry-run --set-selections

# dpkg --get-selections | head -n1
acl purge

manpage also mentions one bug for the dry run parameter, not relevant
for the reported issue as per my understanding:


--no-act usually gives less information than might be helpful.


either behavior or the documentation is expected to be fixed

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: armhf (armv7l)
Foreign Architectures: armel

Kernel: Linux 3.0.35-ygrex-utilite-dirty (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-7
ii  libc62.19-11
ii  liblzma5 5.1.1alpha+20120614-2
ii  libselinux1  2.3-2
ii  tar  1.27.1-2
ii  zlib1g   1:1.2.8.dfsg-2

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt  1.0.9.2

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#764673: dpkg: --dry-run --set-selections perform real actions

2014-10-10 Thread Guillem Jover
Hi!

On Fri, 2014-10-10 at 10:37:39 +0400, yg...@ygrex.ru wrote:
 Package: dpkg
 Version: 1.17.16
 Severity: normal

 if one tries to perform --dry-run --set-selections for some reason,
 real actions will take effect in contradiction to the manpage:
 
 
 Do  everything  which is supposed to be done, but don't write any changes.
 

Indeed, thanks for the bug report.

 here is an example:
 
 # dpkg --get-selections | head -n1
 acl   install
 
 # dpkg --get-selections | head -n1 | sed -r 's/\binstall$/purge/' | dpkg 
 --dry-run --set-selections
 
 # dpkg --get-selections | head -n1
 acl   purge
 
 manpage also mentions one bug for the dry run parameter, not relevant
 for the reported issue as per my understanding:
 
 
 --no-act usually gives less information than might be helpful.
 
 
 either behavior or the documentation is expected to be fixed

Nah, the code was wrong, I've fixed it now locally, and will be
included in the today's upload.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org