The following commit has been merged in the master branch: commit bd0ae9a42b06f09223383e67edb262041e2bd98d Author: Henning Makholm <henn...@makholm.net> Date: Sat Jul 3 04:30:04 2010 +0200
Add new dpkg --force-confask option The option forces a conffile prompt when the conffile from the new package does not differ from the previous one version. Closes: #102609 Signed-off-by: Guillem Jover <guil...@debian.org> diff --git a/debian/changelog b/debian/changelog index a2d130e..acf3793 100644 --- a/debian/changelog +++ b/debian/changelog @@ -71,6 +71,9 @@ dpkg (1.15.8) UNRELEASED; urgency=low * Detect when another process has locked the database, and mention that problematic dpkg --audit results might be due to ongoing operations. Closes: #80252 + * Add new dpkg --force-confask option that forces a conffile prompt when + the conffile from the new package does not differ from the previous one. + Thanks to Henning Makholm <henn...@makholm.net>. Closes: #102609 [ Updated programs translations ] * Catalan (Guillem Jover). diff --git a/man/dpkg.1 b/man/dpkg.1 index d0d6326..d550d11 100644 --- a/man/dpkg.1 +++ b/man/dpkg.1 @@ -427,6 +427,13 @@ there is no default action it will stop to ask the user unless \fB\-\-force\-confnew\fP or \fB\-\-force\-confold\fP is also been given, in which case it will use that to decide the final action. +\fBconfask\fP: +If a conffile has been modified always offer to replace it with the +version in the package, even if the version in the package did not +change. If one of \fB\-\-force\-confnew\fP, \fB\-\-force\-confold\fP, +or \fB\-\-force\-confdef\fP is also given, it will be used to decide +the final action. + \fBoverwrite\fP: Overwrite one package's file with another's file. diff --git a/src/configure.c b/src/configure.c index aa2fad5..f0a7053 100644 --- a/src/configure.c +++ b/src/configure.c @@ -141,7 +141,12 @@ deferred_configure_conffile(struct pkginfo *pkg, struct conffile *conff) } else { useredited = strcmp(conff->hash, currenthash) != 0; distedited = strcmp(conff->hash, newdisthash) != 0; - what = conffoptcells[useredited][distedited]; + + if (fc_conff_ask && useredited) + what = cfo_prompt_keep; + else + what = conffoptcells[useredited][distedited]; + if (!strcmp(currenthash, NONEXISTENTFLAG)) what |= cfof_userrmd; } diff --git a/src/main.c b/src/main.c index c933f24..e1fdebb 100644 --- a/src/main.c +++ b/src/main.c @@ -183,6 +183,7 @@ int fc_removeessential=0, fc_conflicts=0, fc_depends=0, fc_dependsversion=0; int fc_breaks=0, fc_badpath=0, fc_overwritediverted=0, fc_architecture=0; int fc_nonroot=0, fc_overwritedir=0, fc_conff_new=0, fc_conff_miss=0; int fc_conff_old=0, fc_conff_def=0; +int fc_conff_ask = 0; int fc_badverify = 0; int errabort = 50; @@ -204,6 +205,7 @@ static const struct forceinfo { { "confold", &fc_conff_old }, { "confdef", &fc_conff_def }, { "confmiss", &fc_conff_miss }, + { "confask", &fc_conff_ask }, { "depends", &fc_depends }, { "depends-version", &fc_dependsversion }, { "breaks", &fc_breaks }, @@ -417,6 +419,7 @@ static void setforce(const struct cmdinfo *cip, const char *value) { " you will be prompted unless one of the confold or\n" " confnew options is also given\n" " confmiss [!] Always install missing config files\n" +" confask [!] Offer to replace config files with no new versions\n" " breaks [!] Install even if it would break another package\n" " conflicts [!] Allow installation of conflicting packages\n" " architecture [!] Process even packages with wrong architecture\n" diff --git a/src/main.h b/src/main.h index 388febe..17ba2d4 100644 --- a/src/main.h +++ b/src/main.h @@ -129,6 +129,7 @@ extern int fc_removeessential, fc_conflicts, fc_depends, fc_dependsversion; extern int fc_breaks, fc_badpath, fc_overwritediverted, fc_architecture; extern int fc_nonroot, fc_overwritedir, fc_conff_new, fc_conff_miss; extern int fc_conff_old, fc_conff_def; +extern int fc_conff_ask; extern int fc_badverify; extern bool abort_processing; -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org