summaryrefslogtreecommitdiff
path: root/methods
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 /methods
parentad9364e4f0e8a65c2ae16fab9508485e5d915bd2 (diff)
Adding a simple workaround to get rid of debpatch's error messages to the stdout
Diffstat (limited to 'methods')
-rw-r--r--methods/debdelta.cc8
-rw-r--r--methods/makefile7
2 files changed, 12 insertions, 3 deletions
diff --git a/methods/debdelta.cc b/methods/debdelta.cc
index 158beb05f..42d91a6dc 100644
--- a/methods/debdelta.cc
+++ b/methods/debdelta.cc
@@ -57,7 +57,7 @@ bool DebdeltaMethod::Fetch(FetchItem *Itm) /*{{{*/
pid_t Process = ExecFork();
if (Process == 0)
{
- const char* Args[6] = {0};
+ const char* Args[8] = {0};
Args[0] = "/usr/bin/debpatch";
if (!FileExists(Args[0]))
return _error->Error("[Debdelta] Could not find debpatch.");
@@ -65,16 +65,18 @@ bool DebdeltaMethod::Fetch(FetchItem *Itm) /*{{{*/
Args[2] = DebdeltaFile.c_str();
Args[3] = FromFile.c_str();
Args[4] = ToFile.c_str();
+ Args[5] = "1>&2";
+ Args[6] = "2>/dev/null";
if (Debug == true)
{
std::cerr << "[Debdelta] Command:" << std::endl;
std::cerr << Args[0] << " " << Args[1] << " " << Args[2] << " " << Args[3] << " "
<< Args[4] << std::endl;
}
- std::cerr << "[Debdelta] Patching " << ToFile << "..." << std::endl;
+ std::cerr << "[Debdelta] Patching " << ToFile << "...\r";
execv(Args[0], (char **)Args);
}
- if (ExecWait(Process, "debpatch"))
+ if (ExecWait(Process, "debpatch", false))
{
if (!FileExists(ToFile))
return _error->Error("[Debdelta] Failed to patch %s", ToFile.c_str());
diff --git a/methods/makefile b/methods/makefile
index 6ba51058e..666b543f0 100644
--- a/methods/makefile
+++ b/methods/makefile
@@ -72,6 +72,13 @@ LIB_MAKES = apt-pkg/makefile
SOURCE = rred.cc
include $(PROGRAM_H)
+# The debdelta method
+PROGRAM=debdelta
+SLIBS = -lapt-pkg -lz $(SOCKETLIBS) $(INTLLIBS)
+LIB_MAKES = apt-pkg/makefile
+SOURCE = debdelta.cc
+include $(PROGRAM_H)
+
# The rsh method
PROGRAM=rsh
SLIBS = -lapt-pkg $(INTLLIBS)