summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-07-30 18:45:46 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-07-30 18:45:46 +0200
commit973439b6251ce363f44da5afe89cf73214cbfc70 (patch)
treed30035c1ec38eb26bab07e472f3929c5f18105ef /cmdline
parentd5752e18bed18c706c93f5c43c61016c72132ede (diff)
parentfa1d338f0c8770d574db4f3728ef4357765185f7 (diff)
* cmdline/apt-get.cc:
- honor APT::Get::Only-Source properly in FindSrc() (thanks to Martin Pitt for reporting the problem) * Added more error handlings. Closes: #438803, #462734, #454989
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 2ca0855b6..ab6dca388 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1262,7 +1262,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)
{
@@ -1280,7 +1281,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)