]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cf.data.depend
Upgrade process for obsolete options
authorAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 23 Oct 2010 08:50:56 +0000 (02:50 -0600)
committerAmos Jeffries <amosjeffries@squid-cache.org>
Sat, 23 Oct 2010 08:50:56 +0000 (02:50 -0600)
commit76f4448105619e1cefe1af8437604d2ea9a8e886
tree2b7ace47c7f66577f2eab66f2898a9b56a41b1ce
parentfcea65a070c90ea26b46908909558c0e100c1610
Upgrade process for obsolete options

One problem we currently have with upgrades is leaving the parser able
to avoid its bungled/unknown option message for directives which have
been fully removed or massively syntax altered.

We are able to handle this for flags and option syntax easily but the
parser has been particularly dense and strict on the directives (first
word of each line).

This patch updates the cf_* and cfgman code to allow a special directive
type "obsolete" which causes these directives to be handled specially
without causing the directives to remain in the publicly visible
squid.conf documentation.

It allows DOC_START / DOC_END comments to be written in cf.data.pre
describing the upgrade actions that need to be taken. This text is
dumped to cache.log verbatim when the configuration option is sighted.

If "-k parse" is used the text is displayed at debug level 0, otherwise
displayed at debug level 1. One line indicating a generic "directive X
is obsolete" is always displayed at level 0 for backwards compatibility
with admin expectations of a high level "bungled" message.

After all this text display, parse_obsolete(char*) is called with the
directive name. This function exists in cache_cf.cc and can be coded to
selectivey do more complex handling of the directive. ie for upgrade
actions deeper than removal.

 * cf.data.pre has entries added for all the 2.6-3.1 directives I could
   find that were removed up to 3.HEAD
scripts/www/build-cfg-help.pl
src/cache_cf.cc
src/cf.data.depend
src/cf.data.pre
src/cf_gen.cc
src/globals.h
src/main.cc