[Lucid] apt-get source always selects highest available version instead of the specified one

Bug #502641 reported by Philip Muškovac
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apt (Debian)
Fix Released
Unknown
apt (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: apt

It happens with all packages I tried, I'll use amarok as an example

$ apt-cache policy amarok
amarok:
  Installed: 2:2.2.1.90-0ubuntu1
  Candidate: 2:2.2.1.90-0ubuntu1
  Version table:
 *** 2:2.2.1.90-0ubuntu1 0
        600 http://de.archive.ubuntu.com lucid/main Packages
        100 /var/lib/dpkg/status
     2:2.2.0-0ubuntu2 0
         50 http://de.archive.ubuntu.com karmic/main Packages
     2.2.2~beta1-1 0
         -1 http://ftp.de.debian.org experimental/main Packages
     2.2.1-2 0
         -1 http://ftp.de.debian.org testing/main Packages
         -1 http://ftp.de.debian.org unstable/main Packages

If I want the karmic source (I have the deb-src lines in my sources.list) I get

$ apt-get source amarok/karmic
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'amarok' packaging is maintained in the 'Bzr' version control system at:
https://code.launchpad.net/~kubuntu-members/amarok/ubuntu
Please use:
bzr get https://code.launchpad.net/~kubuntu-members/amarok/ubuntu
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 10.0MB of source archives.
Get:1 http://de.archive.ubuntu.com lucid/main amarok 2:2.2.1.90-0ubuntu1 (dsc) [1,994B]
Get:2 http://de.archive.ubuntu.com lucid/main amarok 2:2.2.1.90-0ubuntu1 (tar) [9,949kB]
Get:3 http://de.archive.ubuntu.com lucid/main amarok 2:2.2.1.90-0ubuntu1 (diff) [49.8kB]
Fetched 10.0MB in 7s (1,327kB/s)
gpgv: Signature made Wed 16 Dec 2009 01:35:33 PM CET using DSA key ID DD4D5088
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./amarok_2.2.1.90-0ubuntu1.dsc
dpkg-source: info: extracting amarok in amarok-2.2.1.90
dpkg-source: info: unpacking amarok_2.2.1.90.orig.tar.gz
dpkg-source: info: applying amarok_2.2.1.90-0ubuntu1.diff.gz
W: Ignore unavailable target release 'karmic' of package 'amarok'

If I specify the version instead I get

$ apt-get source amarok=2:2.2.0-0ubuntu2
[...]
W: Ignore unavailable version '2:2.2.0-0ubuntu2' of package 'amarok'

downgrading apt to the karmic version resolves this issue.

ProblemType: Bug
Architecture: i386
Date: Sun Jan 3 17:53:52 2010
DistroRelease: Ubuntu 10.04
Package: apt 0.7.25ubuntu2
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-9.13-generic
SourcePackage: apt
Tags: lucid
Uname: Linux 2.6.32-9-generic i686

Related branches

Revision history for this message
Philip Muškovac (yofel) wrote :
Jonathan Davies (jpds)
Changed in apt (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in apt (Debian):
status: Unknown → Fix Released
Daniel Hahler (blueyed)
Changed in apt (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :
Download full text (4.3 KiB)

This is marked as fixed in 0.7.25.1, but still happens with 0.7.25.3ubuntu1 for me:

$ amad amarok | grep Sources | egrep 'lucid|karmic'
    amarok | 2:2.2.2.90-0ubuntu3 | http://de.archive.ubuntu.com lucid/main Sources
    amarok | 2:2.2.2.90-0ubuntu3 | http://archive.ubuntu.com lucid/main Sources
    amarok | 2:2.2.0-0ubuntu2 | http://de.archive.ubuntu.com karmic/main Sources

$ LANG=C asrc amarok/karmic
apt-get source amarok/karmic
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'amarok' packaging is maintained in the 'Bzr' version control system at:
https://code.launchpad.net/~kubuntu-members/amarok/ubuntu
Please use:
bzr get https://code.launchpad.net/~kubuntu-members/amarok/ubuntu
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 9227kB of source archives.
Get:1 http://de.archive.ubuntu.com lucid/main amarok 2:2.2.2.90-0ubuntu3 (dsc) [1872B]
Get:2 http://de.archive.ubuntu.com lucid/main amarok 2:2.2.2.90-0ubuntu3 (tar) [9166kB]
Get:3 http://de.archive.ubuntu.com lucid/main amarok 2:2.2.2.90-0ubuntu3 (diff) [58.6kB]
Fetched 9227kB in 0s (30.9MB/s)
gpgv: Signature made Tue Mar 2 23:58:17 2010 CET using DSA key ID 72F23991
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./amarok_2.2.2.90-0ubuntu3.dsc
dpkg-source: info: extracting amarok in amarok-2.2.2.90
dpkg-source: info: unpacking amarok_2.2.2.90.orig.tar.bz2
dpkg-source: info: unpacking amarok_2.2.2.90-0ubuntu3.debian.tar.gz
dpkg-source: info: applying debian/disable_qtscriptbindings_check_fix.diff
dpkg-source: info: applying debian/mysql_no_openssl_fix.diff
dpkg-source: info: applying kubuntu/03_restricted_install.diff
dpkg-source: info: applying kubuntu/05_kstatusnotifieritem.diff
W: Ignore unavailable target release 'karmic' of package 'amarok'

Getting by version fails, too:
$ LANG=C asrc amarok=2.2.0-0ubuntu2
apt-get source amarok=2.2.0-0ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'amarok' packaging is maintained in the 'Bzr' version control system at:
https://code.launchpad.net/~kubuntu-members/amarok/ubuntu
Please use:
bzr get https://code.launchpad.net/~kubuntu-members/amarok/ubuntu
to retrieve the latest (possibly unreleased) updates to the package.
Skipping already downloaded file 'amarok_2.2.2.90-0ubuntu3.dsc'
Skipping already downloaded file 'amarok_2.2.2.90.orig.tar.bz2'
Skipping already downloaded file 'amarok_2.2.2.90-0ubuntu3.debian.tar.gz'
Need to get 0B of source archives.
Skipping unpack of already unpacked source in amarok-2.2.2.90
W: Ignore unavailable version '2.2.0-0ubuntu2' of package 'amarok'

But, selecting by epoch and version appears to work:

$ LANG=C asrc amarok=2:2.2.0-0ubuntu2
apt-get source amarok=2:2.2.0-0ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'amarok' packaging is maintained in the 'Bzr' version contr...

Read more...

Changed in apt (Ubuntu):
importance: Low → Medium
Daniel Hahler (blueyed)
Changed in apt (Ubuntu):
milestone: none → ubuntu-10.04-beta-1
Revision history for this message
Daniel Hahler (blueyed) wrote :

Bumping Importance: makes "apt-get source" useless for anything than the most recent version.
Also, the "--only-source" workaround mentioned in the Debian bug does not work for me.

Changed in apt (Ubuntu):
importance: Medium → High
Revision history for this message
Philip Muškovac (yofel) wrote :

Actually I can confrim again that apt behaves odd again:

$ apt-cache policy mediatomb
mediatomb:
  Installed: (none)
  Candidate: 0.12.0~svn2018-6ubuntu1
  Version table:
     0.12.0~svn2018-6ubuntu1 0
        600 http://de.archive.ubuntu.com lucid/universe Packages
     0.12.0~svn2018-6 0
         -1 http://ftp.de.debian.org testing/main Packages
         -1 http://ftp.de.debian.org unstable/main Packages
     0.12.0~svn2018-4ubuntu1 0
         50 http://de.archive.ubuntu.com karmic/universe Packages
     0.11.0-3 0
         -1 http://ftp.de.debian.org stable/main Packages

apt-get source mediatomb/stabe -> downlaods stable
apt-get source mediatomb/karmic -> downloads karmic
apt-get source mediatomb/unstable -> downloads lucid
apt-get source mediatomb/testing -> downloads lucid
apt-get source mediatomb/lucid -> downlaods lucid

And getting by version fails for me too

Revision history for this message
Michael Vogt (mvo) wrote :

Hello,

a couple of points:
$ apt-get source amarok=2.2.0-0ubuntu2
does not work correctly /gets the lucid source) and does not show a message. this is a bug (and a regression to karmic).

But
$ apt-get source amarok=2:2.2.0-0ubuntu2
does work correctly and gives the right version.

As for:
$ apt-get source amarok/karmic
gets the lucid source.

Revision history for this message
Michael Vogt (mvo) wrote :

Could you please check that:
$ apt-get source amarok/karmic
works if you have both "deb" and "deb-src" urls. But not with only deb-src URLs (this is a old bug).

Revision history for this message
Michael Vogt (mvo) wrote :

Some further looking shows that:

# ./apt-get source -d amarok=2.xxx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping already downloaded file 'amarok_2.2.2.90-0ubuntu3.dsc'
Need to get 9,225kB of source archives.
Get:1 http://archive.ubuntu.com/ubuntu/ lucid/main amarok 2:2.2.2.90-0ubuntu3 (tar) [9,166kB]
Get:2 http://archive.ubuntu.com/ubuntu/ lucid/main amarok 2:2.2.2.90-0ubuntu3 (diff) [58.6kB]
Fetched 5,739kB in 9s (606kB/s)
Download complete and in download only mode
W: Ignore unavailable version '2.xxx' of package 'amarok'

It prints a warning at the end - I make this a hard error instead now.

Michael Vogt (mvo)
Changed in apt (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.7.25.3ubuntu2

---------------
apt (0.7.25.3ubuntu2) lucid; urgency=low

  [ Michael Vogt ]
  * abicheck/
    - add new abitest tester using the ABI Compliance Checker from
      http://ispras.linuxfoundation.org/index.php/ABI_compliance_checker
  * debian/apt.conf.autoremove:
    - add "oldlibs" to the APT::Never-MarkAuto-Sections as its used
      for transitional packages
  * apt-pkg/deb/dpkgpm.cc:
    - fix backgrounding when dpkg runs (closes: #486222)
  * cmdline/apt-mark:
    - show error on incorrect aguments (LP: #517917), thanks to
      Torsten Spindler
  * cmdline/apt-get.cc:
    - if apt-get source foo=version or foo/distro can not be found,
      error out (LP: #502641)
  * apt-pkg/indexfile.cc:
    - deal correctly with three letter langcodes (LP: #391409)
  * debian/apt.cron.daily:
    - do not look into admin users gconf anymore for the http proxy
      the user now needs to use the "Apply system-wide" UI in the
      gnome-control-center to set it
  * debian/apt.postinst:
    - add set_apt_proxy_from_gconf() and run that once on upgrade if
      there is no proxy configured already system-wide (LP: #432631)
      From that point on gnome-control-center will have to warn if
      the user makes changes to the proxy settings and does not apply
      them system wide

  [ Robert Collins ]
  * Change the package index Info methods to allow apt-cache policy to be
    useful when using several different archives on the same host.
    (Closes: #329814, LP: #22354)
 -- Michael Vogt <email address hidden> Fri, 12 Mar 2010 23:10:52 +0100

Changed in apt (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Claude Heiland-Allen (claudiusmaximus) wrote :

This isn't entirely fixed IMHO, or a regression has occurred - the only way I can get an old version's source is if I have a corresponding 'deb' line in my sources as well as a 'deb-src' line, which is inconvenient. I think that solely the 'deb-src' line should be required for getting sources.

$ apt-get --version
apt 0.7.25.3ubuntu9.3 for amd64 compiled on Sep 9 2010 22:31:26
Supported modules:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
 S.L: 'deb' Standard Debian binary tree
 S.L: 'deb-src' Standard Debian source tree
 Idx: Debian Source Index
 Idx: Debian Package Index
 Idx: Debian Translation Index
 Idx: Debian dpkg status file

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.