[jaunty] apt-get source linux-image`-uname -r` does not download sources

Bug #330103 reported by Khashayar Naderehvandi
6
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
Medium
Michael Vogt
Jaunty
Fix Released
Medium
Michael Vogt

Bug Description

During my intrepid days, the following command would download the linux sources along with everything needed to rebuild a kernel package locally:

apt-get source linux-image-`uname -r`

That's precisely the behavior I would expect.

In jaunty, however, the same command only gets me the linux-meta stuff. Which makes this a regression, I guess.

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

Here is a patch that should fix the issue:

=== modified file 'cmdline/apt-get.cc'
--- cmdline/apt-get.cc 2008-12-16 06:37:02 +0000
+++ cmdline/apt-get.cc 2009-03-05 13:36:03 +0000
@@ -1272,10 +1272,14 @@
   }
       }
    }
+
+ bool MatchSrcOnly = false;

    // No source package name..
    if (Src.empty() == true)
       Src = TmpSrc;
+ else
+ MatchSrcOnly = true;

    // The best hit
    pkgSrcRecords::Parser *Last = 0;
@@ -1291,13 +1295,13 @@
       binary packages in the search */
    pkgSrcRecords::Parser *Parse;
    SrcRecs.Restart();
- while ((Parse = SrcRecs.Find(Src.c_str(),false)) != 0)
+ while ((Parse = SrcRecs.Find(Src.c_str(),MatchSrcOnly)) != 0)
    {
       string Ver = Parse->Version();

       // show name mismatches
       if (IsMatch == true && Parse->Package() != Src)
- ioprintf(c1out, _("No source package '%s' picking '%s' instead"), Parse->Package().c_str(), Src.c_str());
+ ioprintf(c1out, _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str());

       if (VerTag.empty() == false)
       {

Changed in apt:
importance: Undecided → Medium
milestone: none → ubuntu-9.04-beta
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Milestoned bug, needs assignee.

Changed in apt:
assignee: nobody → mvo
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.7.20.2ubuntu2

---------------
apt (0.7.20.2ubuntu2) jaunty; urgency=low

  * apt-pkg/deb/dpkgpm.cc:
    - revert termios patch (LP: #338514)
  * cmdline/apt-get.cc
    - fix "apt-get source pkg" if there is a binary package and
      a source package of the same name but from different
      packages (LP: #330103)

 -- Michael Vogt <email address hidden> Mon, 09 Mar 2009 16:33:28 +0100

Changed in apt:
status: Triaged → Fix Released
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.