Comment 1 for bug 330103

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)
       {