INN commit: trunk (doc/pod/news.pod scripts/innupgrade.in)

INN Commit Russ_Allbery at isc.org
Sun Apr 12 09:01:52 UTC 2009


    Date: Sunday, April 12, 2009 @ 02:01:51
  Author: iulius
Revision: 8412

innupgrade was assuming that Xref:full was the eighth field
in overview.fmt, which might not always be the case.

Modified:
  trunk/doc/pod/news.pod
  trunk/scripts/innupgrade.in

-----------------------+
 doc/pod/news.pod      |    7 +++++--
 scripts/innupgrade.in |   24 ++++++++++++++++++------
 2 files changed, 23 insertions(+), 8 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2009-04-11 22:32:03 UTC (rev 8411)
+++ doc/pod/news.pod	2009-04-12 09:01:51 UTC (rev 8412)
@@ -35,8 +35,9 @@
 I<extraoverviewhidden>.  Although B<innupgrade> takes care of the
 change during C<make update>, you should make sure that your overview
 database is consistent with all the fields declared in F<overview.fmt>
-because they will all be advertised.  See the inn.conf(5) man page
-for more information about these parameters.
+because they will all be advertised, and C<Xref:full> forced as the
+eighth overview field.  See the inn.conf(5) man page for more information
+about these parameters.
 
 =item *
 
@@ -258,6 +259,8 @@
 F<inn.conf> to deal with TLS support:  I<tlscafile>, I<tlscapath>,
 I<tlscertfile> and I<tlskeyfile>.
 
+=item *
+
 The F<overview.fmt> file has been removed in favour of new parameters
 in F<inn.conf> to deal with transition periods to accommodate
 overview reconfigurations.  It is now possible to specify on the one

Modified: scripts/innupgrade.in
===================================================================
--- scripts/innupgrade.in	2009-04-11 22:32:03 UTC (rev 8411)
+++ scripts/innupgrade.in	2009-04-12 09:01:51 UTC (rev 8412)
@@ -105,16 +105,28 @@
     # Import the settings from overview.fmt if present and not found in inn.conf.
     if (!$overview && -f 'overview.fmt') {
         open (OVERVIEWFMT, 'overview.fmt') or die "Can't open overview.fmt: $!\n";
-        my (@extraoverview, $foundxref);
+        my (@extraoverview, $foundfull, $foundxref);
         while (<OVERVIEWFMT>) {
-            # Find out what follows the *first* "Xref:full" in the file.
+            # Find out the first ":full" in the file.  It may not be "Xref:full".
             # One "Xref" is already advertised as the eighth field in
-            # the overview database.
+            # the overview database so we have to drop the *first* "Xref:full".
+            if (!$foundfull) {
+                if (/:full/i && !/^\s*\#/) {
+                    $foundfull = 1;
+                } else {
+                    next;
+                }
+            }
+
+            next if (/^\s*\#/ || !/:full/i);
+
             if (!$foundxref) {
-                $foundxref = 1 if (/Xref:full/i && !/^\s*\#/);
-                next;
+                if (/Xref:full/i) {
+                    $foundxref = 1;
+                    next;
+                }
             }
-            next if /^\s*\#/ || !/:full/i;
+
             chomp;
             s/\s//g;
             s/:full.*$//i;




More information about the inn-committers mailing list