Package: python-apt
Version: 1.4.0~beta3
Severity: whistlist

Dear Maintainer,

I'm using python-apt to analyse inter-package-dependencies and just
stumbled over "python-cffi-backend", which already uses versioned
Provdies¹ in Debian-Stretch:

        import apt
        cache = apt.Cache()
        pkg = cache['python-cffi-backend']
        cand = pkg.candidate
        print(cand.provides)
        # ['python-cffi-backend-api-min', 'python-cffi-backend-api-max', 
'python-cffi-backend-api-9729']
        print(cand.record['Provides'])
        # 'python-cffi-backend-api-9729, python-cffi-backend-api-max (= 10239), 
python-cffi-backend-api-min (= 9729)'

As a temporary work-around I'm now using

        for (providesname, providesver, version) in cand._cand.provides_list:
                print(providesname, providesver)
        # ('python-cffi-backend-api-min', '9729')
        # ('python-cffi-backend-api-max', '10239')
        # ('python-cffi-backend-api-9729', None)

python-apt should have an "official" API to access the version
information.

¹: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761219>: debian-policy: 
document versioned Provides

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de:en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-apt depends on:
ii  dirmngr            2.1.18-8~deb9u1
ii  gnupg              2.1.18-8~deb9u1
ii  libapt-inst2.0     1.4.8
ii  libapt-pkg5.0      1.4.8
ii  libc6              2.24-11+deb9u1
ii  libgcc1            1:6.3.0-18
ii  libstdc++6         6.3.0-18
ii  python             2.7.13-2
ii  python-apt-common  1.4.0~beta3

Versions of packages python-apt recommends:
ii  iso-codes    3.75-1
ii  lsb-release  9.20161125
ii  xz-utils     5.2.2-1.2+b1

Versions of packages python-apt suggests:
ii  apt             1.4.8
pn  python-apt-dbg  <none>
ii  python-apt-doc  1.4.0~beta3

-- no debconf information

Reply via email to