* cmdline/apt-get.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 30 Jul 2009 13:28:21 +0000 (15:28 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 30 Jul 2009 13:28:21 +0000 (15:28 +0200)
  - honor APT::Get::Only-Source properly in FindSrc() (thanks to
    Martin Pitt for reporting the problem)

cmdline/apt-get.cc
debian/changelog

index 27e16d3..2693bd9 100644 (file)
@@ -1260,7 +1260,8 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
    /* Lookup the version of the package we would install if we were to
       install a version and determine the source package name, then look
       in the archive for a source package of the same name. */
-   if (_config->FindB("APT::Get::Only-Source") == false)
+   bool MatchSrcOnly = _config->FindB("APT::Get::Only-Source");
+   if (MatchSrcOnly == false)
    {
       if (Pkg.end() == false)
       {
@@ -1278,7 +1279,6 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
    unsigned long Offset = 0;
    string Version;
    bool IsMatch = false;
-   bool MatchSrcOnly = false;
 
    // No source package name..
    if (Src.empty() == true)
index 2fb5397..59a88ca 100644 (file)
@@ -1,3 +1,11 @@
+apt (0.7.22) unstable; urgency=low
+
+  * cmdline/apt-get.cc:
+    - honor APT::Get::Only-Source properly in FindSrc() (thanks to
+      Martin Pitt for reporting the problem)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 30 Jul 2009 15:27:30 +0200
+
 apt (0.7.21) UNRELEASED; urgency=low
 
   [ Osamu Aoki ]