From c2e5a59bcb7a1a7e736fe720602fab4dbd8d2d17 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sun, 24 Dec 2000 11:12:41 +0000 Subject: [PATCH] Added a --force-all option. --- ChangeLog | 4 ++++ debian/changelog | 1 + main/dpkg.8 | 3 +++ main/main.c | 14 +++++++++++--- po/dpkg.pot | 11 ++++++----- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09dce863..4b00f8c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 24 05:10:29 CST 2000 Adam Heath + + * main/main.c: Added a --force-all option. + Sun Dec 24 04:32:34 CST 2000 Adam Heath * main/main.c: Format help string for --abort-after like other diff --git a/debian/changelog b/debian/changelog index 56b66de5..9bab6ad4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ dpkg (1.8.0) unstable; urgency=low + * Added a --force-all option. Closes: #61354. * Format help string for --abort-after like other option help strings. Closes: #62464. * Fix dselect methods to pass admindir to dpkg from dselect. diff --git a/main/dpkg.8 b/main/dpkg.8 index 5c7cc4b7..b17d05e0 100644 --- a/main/dpkg.8 +++ b/main/dpkg.8 @@ -331,6 +331,9 @@ Things marked with (*) are forced by default. only. Using them without fully understanding their effects may break 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. diff --git a/main/main.c b/main/main.c index f2c23c6d..d52f6ba5 100644 --- a/main/main.c +++ b/main/main.c @@ -254,7 +254,7 @@ static void setinteger(const struct cmdinfo *cip, const char *value) { *cip->iassignto= v; } -static void setforce(const struct cmdinfo *cip, const char *value) { +void setforce(const struct cmdinfo *cip, const char *value) { const char *comma; int l; const struct forceinfo *fip; @@ -264,6 +264,7 @@ static void setforce(const struct cmdinfo *cip, const char *value) { warn but continue: --force-,,...\n\ 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\ @@ -299,11 +300,18 @@ Forcing options marked [*] are enabled by default.\n"), for (fip=forceinfos; fip->name; fip++) if (!strncmp(fip->name,value,l) && strlen(fip->name)==l) break; if (!fip->name) - badusage(_("unknown force/refuse option `%.*s'"), l<250 ? l : 250, value); - *fip->opt= cip->arg; + if(!strncmp("all",value,l)) + for (fip=forceinfos; fip->name; fip++) + *fip->opt= cip->arg; + else + badusage(_("unknown force/refuse option `%.*s'"), l<250 ? l : 250, value); + else + *fip->opt= cip->arg; if (!comma) break; value= ++comma; } + for (fip=forceinfos; fip->name; fip++) + fprintf(stderr, "%s=%c\n", fip->name, *fip->opt); } static const char *const passlongopts[]= { diff --git a/po/dpkg.pot b/po/dpkg.pot index 1b6432af..32426187 100644 --- a/po/dpkg.pot +++ b/po/dpkg.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-12-23 20:46-0600\n" +"POT-Creation-Date: 2000-12-24 05:07-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2098,7 +2098,7 @@ msgid "" " --ignore-depends=,... Ignore dependencies involving \n" " --force-... Override problems - see --force-help\n" " --no-force-...|--refuse-... Stop when problems encountered\n" -" --abort-after abort after encountering errors\n" +" --abort-after Abort after encountering errors\n" "\n" "Comparison operators for --compare-versions are:\n" " lt le eq ne ge gt (treat no version as earlier than any version);\n" @@ -2174,6 +2174,7 @@ msgid "" " warn but continue: --force-,,...\n" " 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" @@ -2205,16 +2206,16 @@ msgid "" "Forcing options marked [*] are enabled by default.\n" msgstr "" -#: main/main.c:302 +#: main/main.c:307 #, c-format msgid "unknown force/refuse option `%.*s'" msgstr "" -#: main/main.c:381 +#: main/main.c:389 msgid "failed to exec dpkg-deb" msgstr "" -#: dpkg-deb/main.c:155 main/main.c:418 split/main.c:163 +#: dpkg-deb/main.c:155 main/main.c:426 split/main.c:163 msgid "need an action option" msgstr "" -- 2.39.5