Package: dpkg
Version: 1.18.4
Severity: normal

Hi,

this is a followup to the discussion I had with Guillem in some bug
reports in early 2016 and in private mail, the latter unfortunately
never answered.

I think that the path-include option is handling symlinks differently
from normal files, which is confusing for the end-user. If this is
intentional, it needs to be documented much more verbosely.

Way to reproduce:

- use debootstrap to set up a sid chroot with variant minbase
- copy tzdata*.deb from unstable (today: 2016c-1) to the chroot
- chroot inside the chroot
- purge tzdata

After this process, /usr/share/zoneinfo does not exist.

Then try:

dpkg --install \
  --path-exclude=/usr/share/zoneinfo/* \
  --path-exclude=/usr/share/zoneinfo/*/* \
  tzdata*.deb

/usr/share/zoneinfo now exists and is empty. This shows that the
path-exclude has actually worked.

purge tzdata again, verify that /usr/share/zoneinfo does not exist.

Then try:
  
dpkg --install \
  --path-exclude=/usr/share/zoneinfo/* \
  --path-exclude=/usr/share/zoneinfo/*/* \
  --path-include=/usr/share/zoneinfo/Europe \
  tzdata*.deb

And see that /usr/share/zoneinfo/Europe has been populated with
symlinks _only_.

dpkg --install \
  --path-exclude=/usr/share/zoneinfo/* \
  --path-exclude=/usr/share/zoneinfo/*/* \
  --path-include=/usr/share/zoneinfo/Europe \
  --path-include=/usr/share/zoneinfo/Europe/Paris \
  tzdata*.deb

adds the Europe/Paris _file_ to all the symlinks.

I would either expect:

(a)
--path-include=/usr/share/zoneinfo/Europe including _all_ contents,
regular files -and- symlinks to the filesystem or

(b)
--path-include=/usr/share/zoneinfo/Europe adding _only_ the empty
directory to the filesystem.



It also does not seem possible to not having the symlinks, but the
directory. Adding --path-exclude=/usr/share/zoneinfo/Europe/Zurich
does not prevent the symlink from being installed. As long as the
directory is included, the symlinks are unconditionally included as
well.

Greetings
Marc


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.6-zgws1 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-8
ii  libc6        2.22-3
ii  liblzma5     5.1.1alpha+20120614-2.1
ii  libselinux1  2.4-3+b1
ii  tar          1.28-2.1
ii  zlib1g       1:1.2.8.dfsg-2+b1

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt  1.2.7

-- no debconf information

Reply via email to