Package: dpkg
Version: 1.16.9
Severity: normal

Dear Maintainers,

I recently noticed that the workflow to install in a basic box the
list of extra packages present in other more complete box seems to
no longer work

full-box#  dpkg --get-selections > desired-selections.txt
basic-box# dpkg --get-selections < desired-selections.txt
basic-box# apt-get upgrade

This is better seen in a chroot with following sequence

# debootstrap sid mychroot http://http.debian.net/debian
# chroot mychroot

In the chroot:

mychroot# apt-get update
mychroot# echo "joe install" | dpkg --set-selections
... dpkg: warning: package not in database at line 1: joe
mychroot# apt-get upgrade
... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mychroot# dpkg --get-selections | grep joe

Selection seems lost. Trying with apt-get dselect-upgrade does not help

mychroot# apt-get install dselect
mychroot# apt-get dselect-upgrade
... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mychroot# dselect update
mychroot# apt-get dselect-upgrade
... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Only if I set selections again after "dselect update" things work (althouch
only for "apt-get dselect-upgrade"). After previous commands

mychroot# echo "joe install" | dpkg --set-selections
mychroot# apt-get upgrade
... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

mychroot# apt-get dselect-upgrade
... 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
... Setting up joe (3.7-2.3) ...

--------------------

Seems that dpkg ignores setting values for packages that were never installed
or removed in the system, although they are available and can be retrieved
with apt-get. I guess "dselect update" adds apropriate entries to database
that can later be set.

IIRC this workflow is described in a number of places to clone a system, so
behavior should be fixed or clarified. If this change is intentional, some
comment should be added to dpkg man page or to README file. 

Regards,

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (200, 'unstable'), (1,
'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=es_ES.ISO-8859-1, LC_CTYPE=es_ES.ISO-8859-1
(charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-4
ii  libc6        2.13-38
ii  liblzma5     5.1.1alpha+20120614-2
ii  libselinux1  2.1.9-5
ii  tar          1.26+dfsg-0.1
ii  zlib1g       1:1.2.7.dfsg-13

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt  0.9.7.8

-- no debconf information

-- 
Agustin


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

Reply via email to