From 03d44cac22deda06eec974e49d30c1dc7d08ccf5 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 9 Apr 2006 22:02:39 +0000 Subject: [PATCH] Obsolete force/refuse 'auto-select' dpkg option. --- ChangeLog | 8 ++++++++ debian/changelog | 1 + man/C/dpkg.1 | 3 --- man/ChangeLog | 5 +++++ src/main.c | 24 +++++++++++++++--------- src/main.h | 2 +- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e557287..2e5a570a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-04-10 Guillem Jover + + * src/main.h (fc_autoselect): Remove. + * src/main.c (fc_autoselect): Likewise. + (forceinfos): Mark 'auto-select' as obsolete. + (setforce): Remove mention of 'auto-select' from the help text. + Handle obsolete options, and display a warning. + 2006-04-09 Guillem Jover * scripts/dpkg-shlibdeps.pl: Support system library directories diff --git a/debian/changelog b/debian/changelog index e7a479e5..34f83392 100644 --- a/debian/changelog +++ b/debian/changelog @@ -38,6 +38,7 @@ dpkg (1.13.18~) UNRELEASED; urgency=low '/lib/ldconfig'. Closes: #356452 * Document that 'dpkg --get-selections' and 'dpkg-query -l' without a pattern will not list packages in state purge. Closes: #355633 + * Obsolete force/refuse 'auto-select' dpkg option. [ Christian Perrier ] * diff --git a/man/C/dpkg.1 b/man/C/dpkg.1 index 0191b96b..0d3e92cc 100644 --- a/man/C/dpkg.1 +++ b/man/C/dpkg.1 @@ -333,9 +333,6 @@ your whole system.\fP \fBall\fP: Turns on(or off) all force options. -\fBauto\-select\fP(*): -Select packages to install them, and deselect packages to remove them. - \fBdowngrade\fP(*): Install a package, even if newer version of it is already installed. diff --git a/man/ChangeLog b/man/ChangeLog index e4d0bb46..5fb69948 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2006-04-10 Guillem Jover + + * C/dpkg.1: Remove mention of obsolete force/refuse 'auto-select' + option. + 2006-04-09 Guillem Jover * C/dpkg.1: Document that '--get-selections' without a pattern will diff --git a/src/main.c b/src/main.c index b820ee3e..c3c652d9 100644 --- a/src/main.c +++ b/src/main.c @@ -135,7 +135,7 @@ unsigned long f_debug=0; /* Change fc_overwrite to 1 to enable force-overwrite by default */ int fc_downgrade=1, fc_configureany=0, fc_hold=0, fc_removereinstreq=0, fc_overwrite=0; int fc_removeessential=0, fc_conflicts=0, fc_depends=0, fc_dependsversion=0; -int fc_autoselect=1, fc_badpath=0, fc_overwritediverted=0, fc_architecture=0; +int 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_badverify = 0; @@ -161,7 +161,6 @@ static const struct forceinfo { { "confmiss", &fc_conff_miss }, { "depends", &fc_depends }, { "depends-version", &fc_dependsversion }, - { "auto-select", &fc_autoselect }, { "bad-path", &fc_badpath }, { "not-root", &fc_nonroot }, { "overwrite", &fc_overwrite }, @@ -169,6 +168,8 @@ static const struct forceinfo { { "overwrite-dir", &fc_overwritedir }, { "architecture", &fc_architecture }, { "bad-verify", &fc_badverify }, + /* FIXME: obsolete options, remove in the future. */ + { "auto-select", NULL }, { 0 } }; @@ -296,7 +297,6 @@ static void setforce(const struct cmdinfo *cip, const char *value) { stop with error: --refuse-,,... | --no-force-,...\n\ Forcing things:\n\ all [!] Set all force options\n\ - auto-select [*] (De)select packages to install (remove) them\n\ downgrade [*] Replace a package with a lower version\n\ configure-any Configure any package which may help this one\n\ hold Process incidental packages even when on hold\n\ @@ -331,14 +331,20 @@ Forcing options marked [*] are enabled by default.\n"), l= comma ? (int)(comma-value) : strlen(value); for (fip=forceinfos; fip->name; fip++) if (!strncmp(fip->name,value,l) && strlen(fip->name)==l) break; - if (!fip->name) - if(!strncmp("all",value,l)) + if (!fip->name) { + if (strncmp("all", value, l) == 0) { for (fip=forceinfos; fip->name; fip++) - *fip->opt= cip->arg; - else + if (fip->opt) + *fip->opt= cip->arg; + } else badusage(_("unknown force/refuse option `%.*s'"), l<250 ? (int)l : 250, value); - else - *fip->opt= cip->arg; + } else { + if (fip->opt) + *fip->opt= cip->arg; + else + fprintf(stderr, _("Warning: obsolete force/refuse option `%s'\n"), + fip->name); + } if (!comma) break; value= ++comma; } diff --git a/src/main.h b/src/main.h index a23d9170..709f76f9 100644 --- a/src/main.h +++ b/src/main.h @@ -85,7 +85,7 @@ extern int f_autodeconf, f_largemem, f_nodebsig; extern unsigned long f_debug; extern int fc_downgrade, fc_configureany, fc_hold, fc_removereinstreq, fc_overwrite; extern int fc_removeessential, fc_conflicts, fc_depends, fc_dependsversion; -extern int fc_autoselect, fc_badpath, fc_overwritediverted, fc_architecture; +extern int 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_badverify; -- 2.39.5