The following commit has been merged in the master branch:
commit 2272d4116924caad96816871040a8c1ae16f87e9
Author: Guillem Jover <[email protected]>
Date: Sat Oct 16 19:10:42 2010 +0200
Move error context display handler reset to error_unwind()
Never print an error message when doing normal cleanup, as this is
something we always want to do.
diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
index 0a66a13..7a06b53 100644
--- a/lib/dpkg/dpkg.h
+++ b/lib/dpkg/dpkg.h
@@ -115,7 +115,6 @@ DPKG_BEGIN_DECLS
} while (0)
#define standard_shutdown() do { \
- set_error_display(NULL, NULL); \
error_unwind(ehflag_normaltidy);\
} while (0)
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 9e15161..61bf5eb 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -242,6 +242,10 @@ void error_unwind(int flagset) {
tecp= econtext;
econtext= tecp->next;
+
+ /* If we are cleaning up normally, do not print anything. */
+ if (flagset & ehflag_normaltidy)
+ set_error_printer(tecp, NULL, NULL);
run_cleanups(tecp,flagset);
free(tecp);
}
diff --git a/lib/dpkg/test.h b/lib/dpkg/test.h
index 98695e2..670001b 100644
--- a/lib/dpkg/test.h
+++ b/lib/dpkg/test.h
@@ -54,7 +54,6 @@ main(int argc, char **argv)
test();
/* Shutdown. */
- set_error_display(NULL, NULL);
error_unwind(ehflag_normaltidy);
return 0;
diff --git a/src/archives.c b/src/archives.c
index 5103a94..ef51896 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1258,7 +1258,7 @@ void archivefiles(const char *const *argv) {
m_output(stdout, _("<standard output>"));
m_output(stderr, _("<standard error>"));
onerr_abort--;
- set_error_display(NULL, NULL);
+
error_unwind(ehflag_normaltidy);
}
diff --git a/src/main.c b/src/main.c
index a504794..8558d56 100644
--- a/src/main.c
+++ b/src/main.c
@@ -658,7 +658,7 @@ void commandfd(const char *const *argv) {
actionfunction= (void (*)(const char* const*))cipaction->farg;
actionfunction(newargs);
- set_error_display(NULL, NULL);
+
error_unwind(ehflag_normaltidy);
}
}
diff --git a/src/packages.c b/src/packages.c
index 71cb50e..cfdde66 100644
--- a/src/packages.c
+++ b/src/packages.c
@@ -248,7 +248,7 @@ void process_queue(void) {
}
m_output(stdout, _("<standard output>"));
m_output(stderr, _("<standard error>"));
- set_error_display(NULL, NULL);
+
error_unwind(ehflag_normaltidy);
}
assert(!queue.length);
diff --git a/src/trigproc.c b/src/trigproc.c
index 1490d61..b1151fd 100644
--- a/src/trigproc.c
+++ b/src/trigproc.c
@@ -122,7 +122,6 @@ trigproc_run_deferred(void)
pkg->clientdata->trigprocdeferred = NULL;
trigproc(pkg);
- set_error_display(NULL, NULL);
error_unwind(ehflag_normaltidy);
}
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]