apt-get source picks Ubuntu version instead of Debian when requesting Debian version and there is only "deb-src", but not "deb"

Bug #918213 reported by Daniel Hahler
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Debian)
New
Undecided
Unassigned
apt (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

When requesting the version from Debian (3.2.1-2), the Ubuntu version gets downloaded instead (3.2.1-2ubuntu1).

% apt-cache madison backuppc | grep Source
  backuppc | 3.2.1-2ubuntu1 | http://archive.ubuntu.com/ubuntu/ precise/main Sources
  backuppc | 3.2.1-2ubuntu1 | http://archive.ubuntu.com/ubuntu/ precise/main Sources
  backuppc | 3.2.1-2ubuntu1 | http://archive.ubuntu.com/ubuntu/ precise/main Sources
  backuppc | 3.1.0-9 | http://ftp.de.debian.org/debian/ stable/main Sources
  backuppc | 3.2.1-2 | http://ftp.de.debian.org/debian/ unstable/main Sources
  backuppc | 3.2.1-2 | http://ftp.de.debian.org/debian/ testing/main Sources

% apt-get source backuppc=3.2.1-2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 543 kB of source archives.
Get:1 http://archive.ubuntu.com/ubuntu/ precise/main backuppc 3.2.1-2ubuntu1 (dsc) [1,147 B]
Get:2 http://archive.ubuntu.com/ubuntu/ precise/main backuppc 3.2.1-2ubuntu1 (tar) [512 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ precise/main backuppc 3.2.1-2ubuntu1 (diff) [30.1 kB]
Fetched 543 kB in 1s (281 kB/s)
[...]

I have then tried to use the release name instead, but it fails with both "/unstable" and "-t unstable" notation:

% apt-get source backuppc/unstable
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Ignore unavailable target release 'unstable' of package 'backuppc'
E: Unable to find a source package for

% apt-get source -t testing backuppc
Reading package lists... Done
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources

The issue appears to be that you do not need also "deb" lines in your apt sources.list, not just "deb-src".

It works now with the "deb" line for unstable being added.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apt 0.8.16~exp5ubuntu14.2
ProcVersionSignature: Ubuntu 3.2.0-9.16-generic-pae 3.2.1
Uname: Linux 3.2.0-9-generic-pae i686
ApportVersion: 1.90-0ubuntu2
Architecture: i386
Date: Wed Jan 18 14:59:14 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
SourcePackage: apt
UpgradeStatus: Upgraded to precise on 2011-12-16 (33 days ago)

Revision history for this message
Daniel Hahler (blueyed) wrote :
Changed in apt (Debian):
status: Unknown → Confirmed
Revision history for this message
Torsten Spindler (tspindler) wrote :

I could not reproduce this problem on Precise:

$ apt-cache policy backuppc
backuppc:
  Installed: (none)
  Candidate: 3.2.1-2ubuntu1
  Version table:
     3.2.1-2ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main i386 Packages
     3.2.1-2 0
        500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages
     3.1.0-9ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ lucid/main i386 Packages

$ apt-get source backuppc=3.2.1-2
...
Need to get 541 kB of source archives.
Get:1 http://ftp.de.debian.org/debian/ unstable/main backuppc 3.2.1-2 (dsc) [1,029 B]
Get:2 http://ftp.de.debian.org/debian/ unstable/main backuppc 3.2.1-2 (tar) [512 kB]
Get:3 http://ftp.de.debian.org/debian/ unstable/main backuppc 3.2.1-2 (diff) [27.7 kB]
Fetched 541 kB in 0s (705 kB/s)
dpkg-source: info: extracting backuppc in backuppc-3.2.1
dpkg-source: info: unpacking backuppc_3.2.1.orig.tar.gz
dpkg-source: info: applying backuppc_3.2.1-2.diff.gz
dpkg-source: info: upstream files that have been modified:

Changed in apt (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel Hahler (blueyed) wrote :

What is the output of "apt-cache madison backuppc | grep Source" for you?

Revision history for this message
Daniel Hartwig (wigs) wrote :

Disassociating Debian report; this issue is related to the fuzzy version matching.

Changed in apt (Debian):
importance: Unknown → Undecided
status: Confirmed → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.