This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=8b1d07b22c2d64f0db5a8de205ff5bbe778a51ba commit 8b1d07b22c2d64f0db5a8de205ff5bbe778a51ba Author: Guillem Jover <guil...@debian.org> AuthorDate: Tue Jan 22 03:45:29 2019 +0100 dpkg: Move dependtry description from deferred_configure() to its declaration This moves the description closer to the type defining its values, which makes more sense than in the configure function. --- debian/changelog | 2 ++ src/configure.c | 24 ------------------------ src/main.h | 27 +++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index dcb7025ae..4cfc55b63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -88,6 +88,8 @@ dpkg (1.19.3) UNRELEASED; urgency=medium - dpkg: Use common pattern of assigning as an iterator. - dpkg: Factor trigproc_new_cyclenode() out from check_trigger_cycle(). - dpkg: Switch dependtry from an int to an enum. + - dpkg: Move dependtry description from deferred_configure() to its + declaration. * Build system: - get-version: Use a format string with printf. - run-script: Use $() instead of deprecated ``. diff --git a/src/configure.c b/src/configure.c index 99fc81634..e7237106d 100644 --- a/src/configure.c +++ b/src/configure.c @@ -536,30 +536,6 @@ deferred_configure_conffile(struct pkginfo *pkg, struct conffile *conff) /** * Process the deferred configure package. * - * The algorithm for deciding what to configure first is as follows: - * Loop through all packages doing a ‘try 1’ until we've been round - * and nothing has been done, then do ‘try 2’ and ‘try 3’ likewise. - * The incrementing of ‘dependtry’ is done by process_queue(). - * - * Try 1: - * Are all dependencies of this package done? If so, do it. - * Are any of the dependencies missing or the wrong version? - * If so, abort (unless --force-depends, in which case defer). - * Will we need to configure a package we weren't given as an - * argument? If so, abort ─ except if --force-configure-any, - * in which case we add the package to the argument list. - * If none of the above, defer the package. - * - * Try 2: - * Find a cycle and break it (see above). - * Do as for try 1. - * - * Try 3 (only if --force-depends-version): - * Same as for try 2, but don't mind version number in dependencies. - * - * Try 4 (only if --force-depends): - * Do anyway. - * * @param pkg The package to act on. */ void diff --git a/src/main.h b/src/main.h index b0d08f9da..e43e6d28d 100644 --- a/src/main.h +++ b/src/main.h @@ -217,6 +217,33 @@ enum dep_check breakses_ok(struct pkginfo *pkg, struct varbuf *aemsgs); void deferred_remove(struct pkginfo *pkg); void deferred_configure(struct pkginfo *pkg); +/* + * During the packages queue processing, the algorithm for deciding what to + * configure first is as follows: + * + * Loop through all packages doing a ‘try 1’ until we've been round and + * nothing has been done, then do ‘try 2’, and subsequent ones likewise. + * The incrementing of ‘dependtry’ is done by process_queue(). + * + * Try 1: + * Are all dependencies of this package done? If so, do it. + * Are any of the dependencies missing or the wrong version? + * If so, abort (unless --force-depends, in which case defer). + * Will we need to configure a package we weren't given as an + * argument? If so, abort ─ except if --force-configure-any, + * in which case we add the package to the argument list. + * If none of the above, defer the package. + * + * Try 2: + * Find a cycle and break it (see above). + * Do as for try 1. + * + * Try 3 (only if --force-depends-version): + * Same as for try 2, but don't mind version number in dependencies. + * + * Try 4 (only if --force-depends): + * Do anyway. + */ enum dependtry { DEPEND_TRY_NORMAL = 1, DEPEND_TRY_CYCLES = 2, -- Dpkg.Org's dpkg