On Wed, 5 Apr 2017 15:30:58 +0200 Balint Reczey
<[email protected]> wrote:
> Package: dpkg
> Version: 1.18.23
> Severity: minor
>
>
> Dear Maintainers,
>
> It is documented in man dpkg that dpkg may reinclude and install
> some directories in some --path-exclude= --path-include= combinations.
>
> --path-exclude=glob-pattern
> --path-include=glob-pattern
> ...
> The glob patterns use the same
> wildcards used in the shell, were â*â
> matches any sequence of characters,
> including the empty string and also
> â/â. For example, «/usr/*/READ*»
> matches
> «/usr/share/doc/package/README». As
> usual, â?â matches any single character
> (again, including â/â). And â[â starts
> a character class, which can contain a
> list of characters, ranges and
> complementations. See glob(7) for
> detailed information about globbing.
> Note: the current implementation might
> re-include more directories and
> symlinks than needed, to be on the safe
> side and avoid possible unpack
> failures; future work might fix this.
> ...
>
> This bug tracks the current issue and the potential future work. :-)
And a way of reproducing it (as root):
CHROOT=chroot-sid
mkdir $CHROOT
debootstrap sid $CHROOT
mkdir -p $CHROOT/etc/dpkg/dpkg.cfg.d
cat > $CHROOT/etc/dpkg/dpkg.cfg.d/excludes <<EOF
# Drop all documentation ...
path-exclude=/usr/share/doc/*
path-include=/usr/share/doc/*/copyright
EOF
chroot $CHROOT dpkg-query -f '${binary:Package}\n' -W | xargs chroot
$CHROOT apt-get install --reinstall
chroot $CHROOT find /usr/share/doc -not '(' -name copyright -o -name
'changelog.Debian.*' ')' -exec ls -alhR '{}' ';'
sudo chroot $CHROOT find /usr/share/doc/ -not '(' -name copyright -o
-name 'changelog.Debian.*' ')' | grep '/.*/.*/.*/.*/'|sudo chroot
$CHROOT xargs du -sh
...
/usr/share/doc/adduser:
total 16K
drwxr-xr-x 3 root root 4.0K Apr 5 13:23 .
drwxr-xr-x 157 root root 4.0K Apr 5 13:23 ..
-rw-r--r-- 1 root root 2.0K Jun 26 2016 copyright
drwxr-xr-x 3 root root 4.0K Apr 5 13:23 examples
/usr/share/doc/adduser/examples:
total 12K
drwxr-xr-x 3 root root 4.0K Apr 5 13:23 .
drwxr-xr-x 3 root root 4.0K Apr 5 13:23 ..
drwxr-xr-x 4 root root 4.0K Apr 5 13:23 adduser.local.conf.examples
/usr/share/doc/adduser/examples/adduser.local.conf.examples:
total 16K
drwxr-xr-x 4 root root 4.0K Apr 5 13:23 .
drwxr-xr-x 3 root root 4.0K Apr 5 13:23 ..
drwxr-xr-x 2 root root 4.0K Apr 5 13:23 skel
drwxr-xr-x 2 root root 4.0K Apr 5 13:23 skel.other
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel:
total 8.0K
drwxr-xr-x 2 root root 4.0K Apr 5 13:23 .
drwxr-xr-x 4 root root 4.0K Apr 5 13:23 ..
/usr/share/doc/adduser/examples/adduser.local.conf.examples/skel.other:
total 8.0K
drwxr-xr-x 2 root root 4.0K Apr 5 13:23 .
drwxr-xr-x 4 root root 4.0K Apr 5 13:23 ..
...
/usr/share/doc/base-files:
total 12K
drwxr-xr-x 2 root root 4.0K Apr 5 13:23 .
drwxr-xr-x 157 root root 4.0K Apr 5 13:23 ..
lrwxrwxrwx 1 root root 6 Apr 4 16:00 FAQ -> README
-rw-r--r-- 1 root root 1.2K Apr 4 16:00 copyright
lrwxrwxrwx 1 root root 6 Apr 4 16:00 /usr/share/doc/base-files/FAQ ->
README
...
4.0K /usr/share/doc/libp11-kit0/examples
4.0K /usr/share/doc/libreadline6/examples
4.0K /usr/share/doc/ifupdown/contrib
4.0K /usr/share/doc/ifupdown/examples
12K /usr/share/doc/rsyslog/examples
4.0K /usr/share/doc/passwd/examples
4.0K /usr/share/doc/mount/examples
4.0K /usr/share/doc/mawk/examples
4.0K /usr/share/doc/sed/examples
4.0K /usr/share/doc/gnupg/examples
4.0K /usr/share/doc/procps/examples
4.0K /usr/share/doc/nano/examples
4.0K /usr/share/doc/gnupg-agent/examples
4.0K /usr/share/doc/util-linux/releases
4.0K /usr/share/doc/util-linux/examples
4.0K /usr/share/doc/libreadline7/examples
4.0K /usr/share/doc/apt-utils/examples
0 /usr/share/doc/base-files/FAQ
4.0K /usr/share/doc/apt/examples
16K /usr/share/doc/adduser/examples
4.0K /usr/share/doc/cron/examples
4.0K /usr/share/doc/libpam-modules/examples
Cheers,
Balint