这是indexloc提供的服务,不要输入任何密码

Debian Bug report logs - #819799
No obvious way to path-include a directory without also including all symlinks

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg (PTS, buildd, popcon).

Reported by: Marc Haber <mh+debian-packages@zugschlus.de>

Date: Sat, 2 Apr 2016 11:21:02 UTC

Severity: normal

Found in version dpkg/1.18.4

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#819799; Package dpkg. (Sat, 02 Apr 2016 11:21:05 GMT) (full text, mbox, link).


Acknowledgement sent to Marc Haber <mh+debian-packages@zugschlus.de>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 02 Apr 2016 11:21:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Marc Haber <mh+debian-packages@zugschlus.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: No obvious way to path-include a directory without also including all symlinks
Date: Sat, 02 Apr 2016 13:17:38 +0200
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



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Jul 28 18:17:14 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.