[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#881047: libapt-pkg5.0: for apt_preferences, glob and regexp are buggy on the colon character ":"



Package: libapt-pkg5.0
Version: 1.6~alpha4
Severity: normal

I have both libfreetype6:amd64 and libfreetype6:i386 installed from
stretch, and I want to keep the stretch version. For apt_preferences,
if I use:

Package: libfreetype6*
Pin: release n=stretch
Pin-Priority: 900

"apt-show-versions -a libfreetype6" gives in particular:

libfreetype6:amd64/stable 2.6.3-3.2 uptodate
libfreetype6:i386/stable 2.6.3-3.2 upgradeable to 2.8.1-0.1

(aptitude has the same issue, so that I suppose the bug comes from
libapt-pkg5.0). However, the following is fine:

Package: libfreetype6:*
Pin: release n=stretch
Pin-Priority: 900

"apt-show-versions -a libfreetype6" gives in particular:

libfreetype6:amd64/stable 2.6.3-3.2 uptodate
libfreetype6:i386/stable 2.6.3-3.2 uptodate

i.e. it won't try to upgrade the i386 version.

So it appears that * doesn't match the ":" character here, contrary to
what the glob(7) man page says:

  A '*' (not between brackets) matches any string, including the empty
  string.

(referenced in the apt_preferences(5) man page).

If I try regular expressions, for:

Package: /libfreetype6/
Pin: release n=stretch
Pin-Priority: 900

"apt-show-versions -a libfreetype6" gives in particular:

libfreetype6:amd64/stable 2.6.3-3.2 uptodate
libfreetype6:i386/stable 2.6.3-3.2 upgradeable to 2.8.1-0.1

i.e. same issue. But for:

Package: /libfreetype6:/
Pin: release n=stretch
Pin-Priority: 900

"apt-show-versions -a libfreetype6" gives in particular:

libfreetype6:amd64/stable 2.6.3-3.2 upgradeable to 2.8.1-0.1
libfreetype6:i386/stable 2.6.3-3.2 upgradeable to 2.8.1-0.1

This is buggy and inconsistent with globbing.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libapt-pkg5.0 depends on:
ii  libbz2-1.0  1.0.6-8.1
ii  libc6       2.24-17
ii  libgcc1     1:7.2.0-12
ii  liblz4-1    0.0~r131-2+b1
ii  liblzma5    5.2.2-1.3
ii  libstdc++6  7.2.0-12
ii  libudev1    235-2
ii  zlib1g      1:1.2.8.dfsg-5

Versions of packages libapt-pkg5.0 recommends:
ii  apt  1.6~alpha4

libapt-pkg5.0 suggests no packages.

-- no debconf information


Reply to: