summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorIshan Jayawardena <udeshike@gmail.com>2011-07-15 12:17:39 +0530
committerIshan Jayawardena <udeshike@gmail.com>2011-07-15 12:17:39 +0530
commitd981326d00730fb1af2ba5428d9d7557d9b05f9a (patch)
treee613740e07631b09ca4bc1c28d19bab06cc75db4 /apt-pkg
parentad9364e4f0e8a65c2ae16fab9508485e5d915bd2 (diff)
Adding a simple workaround to get rid of debpatch's error messages to the stdout
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc18
-rw-r--r--apt-pkg/init.cc4
2 files changed, 12 insertions, 10 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 4160767b7..0224a73fe 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -2291,18 +2291,20 @@ void pkgAcqDebdelta::Finished()
bool pkgAcqDebdelta::ReplaceURI()
{
- const Configuration::Item* item =_config->Tree("Aquire::Debdelta::Replace-Rule");
- for (item = item->Child; item != 0; item = item->Next) {
+ const Configuration::Item* item = _config->Tree("Aquire::Debdelta::Replace-Rule");
+ for (item = item->Child; item != 0; item = item->Next)
+ {
size_t pos = 0;
// see if the Des.URI is available in the URI-Space
if ((pos = Desc.URI.find(item->Tag, pos)) != std::string::npos)
{
- Desc.URI.replace(pos, item->Tag.length(), item->Value);
- if (Debug) {
- std::cerr << "[Debdelta] Replaced " << item->Tag << " => " << item->Value << std::endl;
- std::cerr << " New URI: " << Desc.URI << std::endl;
- }
- return true;
+ Desc.URI.replace(pos, item->Tag.length(), item->Value);
+ if (Debug)
+ {
+ std::cerr << "[Debdelta] Replaced " << item->Tag << " => " << item->Value << std::endl;
+ std::cerr << " New URI: " << Desc.URI << std::endl;
+ }
+ return true;
}
}
return _error->Error("[Debdelta] Could not find a replacement URI.");
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 55b6b64f4..d3f573356 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -41,8 +41,8 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.Set("Dir","/");
// Debdelta replacement rule
- Cnf.Set("Aquire::Debdelta::Replace-Rule::Default", "http://debdeltas.debian.net/debian-deltas/");
- Cnf.Set("Aquire::Debdelta::Replace-Rule::http://security.debian.org/", "http://debdeltas.debian.net/debian-security-deltas/");
+ Cnf.Set("Aquire::Debdelta::Replace-Rule::Default", "http://debdeltas.debian.net/debian-deltas/");// http://www.bononia.it/debian-deltas/
+ Cnf.Set("Aquire::Debdelta::Replace-Rule::http://security.debian.org/", "http://debdeltas.debian.net/debian-security-deltas/"); // http://security.ubuntu.com/ubuntu/ => http://www.bononia.it/debian-security-deltas/
// State
Cnf.Set("Dir::State","var/lib/apt/");