pkg.candidate.fetch_source() fails with ValueError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-apt
Even though I can successfully use "apt-get source" to get a source package, I can't get python-apt to do the same.
Note, this is a regression from Karmic.
Example test case:
>>> import apt
>>> c = apt.cache.Cache()
>>> p = c["coreutils"]
>>> p.candidate.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
raise ValueError("No source for %r" % self)
ValueError: No source for <Version: package:'coreutils' version:
>>> ^D
$ apt-get source coreutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 9,730kB of source archives.
Get:1 http://
Get:2 http://
Get:3 http://
Fetched 9,730kB in 6s (1,415kB/s)
gpgv: Signature made Thu 04 Mar 2010 07:06:20 PM PST using RSA key ID 140C6664
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./coreutils_
dpkg-source: info: extracting coreutils in coreutils-7.4
dpkg-source: info: unpacking coreutils_
dpkg-source: info: applying coreutils_
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: python-apt 0.7.94.2ubuntu4
ProcVersionSign
Uname: Linux 2.6.32-17-generic i686
NonfreeKernelMo
Architecture: i386
Date: Wed Mar 31 00:49:40 2010
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100318)
ProcEnviron:
LANGUAGE=
PATH=(custom, user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: python-apt
This bug was fixed in the package python-apt - 0.7.94.2ubuntu5
---------------
python-apt (0.7.94.2ubuntu5) lucid; urgency=low
[ Julian Andres Klode ] 0.8.py:
* apt/package.py:
- Decode using utf-8 in installed_files (LP: #407953).
- Fix fetch_source() to work when source name = binary name (LP: #552400).
* python/cache.cc:
- Check that 2nd argument to Cache.update() really is a SourceList object.
* python/generic.cc:
- Map ArchiveURI property to archive_uri
* utils/migrate-
- Open files in universal newline support and pass filename to ast.parse.
- Add has_key to the list of deprecated functions.
- Don't abort if parsing failed.
- do not require files to end in .py if they are passed on the command
line or if they contain python somewhere in the shebang line.
-- Michael Vogt <email address hidden> Wed, 31 Mar 2010 22:11:38 +0200