diff options
author | Guillem Jover <guillem@debian.org> | 2014-10-18 04:49:33 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-10-20 16:47:53 +0200 |
commit | d3264ed3251cda9083ba8c717926e3dfb97f1a9d (patch) | |
tree | 891f9804d4d4f5678c47bb75598a6479a268b8a9 | |
parent | e121d882c92099d1f1aa9eedd0c0e90806a44efa (diff) | |
download | dpkg-d3264ed3251cda9083ba8c717926e3dfb97f1a9d.tar.gz |
dpkg: Rework dependency problem debug and notices on trigproc()
The dependencies_ok() function already prints adequate debugging
information, there's no point repeating it in the call site.
Add also a notice() in case we end up forcing the dependency.
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | src/trigproc.c | 18 |
2 files changed, 8 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog index b932522ea..8966f5928 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ dpkg (1.17.19) UNRELEASED; urgency=low * Fix trigger dependency checks and cycle detection. Regression introduced in dpkg 1.17.17. Closes: #765434, #765668, #765734, #765781, #765789, #765952 + * Rework dependency problem debug and notice output on trigger processing. [ Updated programs translations ] * Italian (Milo Casagrande): Closes: #765748 diff --git a/src/trigproc.c b/src/trigproc.c index 7e34efb43..bcecac50b 100644 --- a/src/trigproc.c +++ b/src/trigproc.c @@ -337,23 +337,19 @@ trigproc(struct pkginfo *pkg) sincenothing = 0; ok = dependencies_ok(pkg, NULL, &depwhynot); - if (ok == DEP_CHECK_OK) { - debug(dbg_triggers, "trigproc %s dependencies satisfied, " - "processing", pkg_name(pkg, pnaw_always)); - } else if (ok == DEP_CHECK_DEFER) { - debug(dbg_triggers, "trigproc %s dependencies unsatisfied, " - "defer processing", pkg_name(pkg, pnaw_always)); + if (ok == DEP_CHECK_DEFER) { varbuf_destroy(&depwhynot); - enqueue_package(pkg); return; } else if (ok == DEP_CHECK_HALT) { - varbuf_end_str(&depwhynot); - debug(dbg_triggers, "trigproc %s dependencies unsatisfied, " - "skipping due to:\n %s", - pkg_name(pkg, pnaw_always), depwhynot.buf); varbuf_destroy(&depwhynot); return; + } else if (depwhynot.used) { + varbuf_end_str(&depwhynot); + notice(_("%s: dependency problems, but processing " + "triggers anyway as you requested:\n%s"), + pkg_name(pkg, pnaw_nonambig), depwhynot.buf); + varbuf_destroy(&depwhynot); } gaveup = check_trigger_cycle(pkg); |