apt.Package.installed is not multiarch-capable

Bug #703472 reported by Steve Langasek on 2011-01-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-apt (Ubuntu)
Wishlist
Unassigned

Bug Description

Binary package hint: python-apt

python-apt's notion of an "installed" package is a single apt.package.Version object, which has a single 'architecture' attribute. With the introduction of multiarch, it's possible for multiple architectures of a package to be installed at the same time on the system, and this needs to be queryable somehow through the python api.

It seems to me that this information doesn't belong as a list of architectures attached to a Version object, since a Version object gets used in various contexts where this doesn't make sense; so instead I guess we want a list of Version objects, which makes for a backwards-incompatible api change unless this multiarch data is included under a new name with 'installed' kept for backwards compatibility.

'multiarch_installed'? Or break the API? I'm happy to do some work on this, but would like guidance from the maintainers.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: python-apt 0.7.96.1ubuntu11
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Uname: Linux 2.6.35-24-generic x86_64
Architecture: amd64
Date: Sat Jan 15 19:32:44 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: python-apt

Steve Langasek (vorlon) wrote :
Changed in python-apt (Ubuntu):
importance: Undecided → Wishlist
Julian Andres Klode (juliank) wrote :

A package has one architecture, and a version has one architecture. All packages with one name, ignoring the architecture, are called groups in APT, but the bindings are not there yet. I personally would like to see multi-arch in dpkg and a test repository first, so we can try the code when we write it.

On Sun, Jan 16, 2011 at 11:00:35AM -0000, Julian Andres Klode wrote:
> A package has one architecture, and a version has one architecture. All
> packages with one name, ignoring the architecture, are called groups in
> APT, but the bindings are not there yet. I personally would like to see
> multi-arch in dpkg and a test repository first, so we can try the code
> when we write it.

What do you expect such a test repository to contain? The packages for each
architecture will still be listed in their own per-architecture Packages file
in repositories.

We're in progress on getting a dpkg that can co-install compliant
Multi-Arch: same packages, but this will carry on right up until feature
freeze for the natty cycle. If python-apt is going to cope with such
installations in natty, there's a definite need to begin working in
parallel. I'm certainly happy to help with mocking up suitable data for the
test suite if that's of any use.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

tags: added: multiarch natty
removed: maverick
Philipp Kaluza (pixelpapst) wrote :

Thanks to Steve's hard work, multiarch is landing in natty at the moment (see FFe bug #733501 and https://blueprints.launchpad.net/ubuntu/+spec/packageselection-foundations-n-multiarch-support ).
So natty should be a diverse enough repository to test against.
The basic support in dpkg has been there for a while AFAIK, 1.16.0 will make it official, and the current prerelease in natty should be OK to test against and develop for.

Julian Andres Klode (juliank) wrote :

Fixed in python-apt's debian-sid branch. This should land in natty once we fixed some
other bugs, merged it and tested it. Please do note that architecture is a property
of packages in APT, so installed still returns one version, but there are multiple packages
now, such as apt (or apt:amd64) and apt:i386 on and amd64 + i386 system.

The relevant revisons are:
    http://bzr.debian.org/scm/loggerhead/apt/python-apt/debian-sid/revision/484
    http://bzr.debian.org/scm/loggerhead/apt/python-apt/debian-sid/revision/485
    http://bzr.debian.org/scm/loggerhead/apt/python-apt/debian-sid/revision/488

Changed in python-apt (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-apt - 0.7.100.3ubuntu1

---------------
python-apt (0.7.100.3ubuntu1) natty; urgency=low

  * merge fixes from debian-sid, most notably the fixes
    to support multiarch (thanks to Julian Andres Klode)

python-apt (0.7.100.3) unstable; urgency=low

  [ Barry Warsaw ]
  * PyFetchProgress::Pulse(): When ignoring a false return value from
    PyArg_Parse() after running the simple callback pulse(), there can be
    an exception on the stack, which must be cleared. (LP: #711225)

  [ Michael Vogt ]
  * python/arfile.cc, apt/debfile.py:
    - add support for .xz archives
  * tests/test_debfile.py:
    - add test for xz compression
  * update priority of python3-apt to match the archive

  [ Julian Andres Klode ]
  * python/cache.cc:
    - Add Package.get_fullname() and Package.architecture
  * apt/cache.py, apt/package.py:
    - Add architecture property to apt.Package (LP: #703472)
    - Change apt.Package.name to use get_fullname(pretty=True) (LP: #740072)
  * tests/test_debfile.py:
    - Disable multi-arch for the test, it fails when run via test_all.py
    - Fix mixed tab/spaces indentation in xz test
  * tests/test_apt_cache.py:
    - Package records 'Package' field now corresponds to shortname
  * debian/python3-apt-dbg.install
    - Do not try to install old-style debugging files.
  * debian/rules:
    - Support the nocheck build option and ignore test failures on hurd
      (Closes: #610448)
    - Move Python 3 debug files before installing other files (Closes: #619528)

  [ Scott Kitterman ]
   * Removed ${python:Breaks} - No longer used in dh_python2
 -- Michael Vogt <email address hidden> Mon, 04 Apr 2011 16:15:15 +0200

Changed in python-apt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers