summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-02-05 19:06:42 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-02-05 19:06:42 +0100
commitf0b509cdb44cb5e79e9c5ddd7ebec46965138534 (patch)
treef6ec16d25933148a946360098a4dcc29e129814e /methods
parent066b53e95ba224f81d078e7d8df3002275f8a092 (diff)
* apt-pkg/acquire-item.cc:
- use FailReason in pkgAcquire::Item::Failed when available * methods/mirror.cc: - move some debug output into if(Debug)
Diffstat (limited to 'methods')
-rw-r--r--methods/mirror.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc
index ff91130b8..c5c0c7461 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -143,7 +143,8 @@ bool MirrorMethod::GetMirrorFile(string mirror_uri_str)
in both cases! So we need to apply some domain knowledge here :( and
check for /dists/ or /Release.gpg as suffixes
*/
- std::cerr << "GetMirrorFile: " << mirror_uri_str << std::endl;
+ if(Debug)
+ std::cerr << "GetMirrorFile: " << mirror_uri_str << std::endl;
// read sources.list and find match
vector<metaIndex *>::const_iterator I;
@@ -152,13 +153,15 @@ bool MirrorMethod::GetMirrorFile(string mirror_uri_str)
for(I=list.begin(); I != list.end(); I++)
{
string uristr = (*I)->GetURI();
- std::cerr << "Checking: " << uristr << std::endl;
+ if(Debug)
+ std::cerr << "Checking: " << uristr << std::endl;
if(uristr.substr(0,strlen("mirror://")) != string("mirror://"))
continue;
// find matching uri in sources.list
if(mirror_uri_str.substr(0,uristr.size()) == uristr)
{
- std::cerr << "found BaseURI: " << uristr << std::endl;
+ if(Debug)
+ std::cerr << "found BaseURI: " << uristr << std::endl;
BaseUri = uristr.substr(0,uristr.size()-1);
}
}