[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#761662: marked as done (wheezy-pu: package dictionaries-common/1.12.11+deb7u1)



Your message dated Thu, 30 Apr 2015 17:38:56 +0200
with message-id <20150430153856.GA22263@agmartin.aq.upm.es>
and subject line Re: wheezy-pu: package dictionaries-common/1.12.11+deb7u1
has caused the Debian Bug report #761662,
regarding wheezy-pu: package dictionaries-common/1.12.11+deb7u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
761662: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761662
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: wheezy
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

For some time dictionaries-comon package has been complaining loudly with an
installation error when a debconf database corruption affecting it is found,
together with some relevant info to repair that. 

This was initially done in purpose to help debconf maintainer gather
information about the problem. Also, some recovery process for simple
corruptions was added. Usual reason for this was fixed in debconf some time
ago.

Recently, seems that some other yet unknown cause for big corruption
sometimes appears, and I has also been pointed out that accidental removal
of stuff under /var/cache/debconf has the same effect, triggering the
above mentioned installation error (http://bugs.debian.org/751367).

Some code has been added in sid to handle this better, using info provided
by packages to get a list of possible values, and using a debconf question
to warn sysadmin about the problem instead of a failure error message,
together with some other improvements like using always no-await triggers.

I have been sugested in http://bugs.debian.org/751367 to put some of this
code in a wheezy point release, and I would like to know your opinion here,

I am attaching a diff with the minimal changes I suggest to put in that
point upload. It consists of two things,

a) Select a temporary default from a list of known to be available values.
   This was formerly extracted from debconf, but it becomes unavailable if
   corruption is large.

b) Use a debconf question to warn about the problem and give advice.

Thanks very much for your time,

-- 
Agustin
diff -Nru dictionaries-common-1.12.11/debian/changelog dictionaries-common-1.12.11+deb7u1/debian/changelog
--- dictionaries-common-1.12.11/debian/changelog	2013-01-22 14:51:12.000000000 +0100
+++ dictionaries-common-1.12.11+deb7u1/debian/changelog	2014-07-25 16:49:17.000000000 +0200
@@ -1,3 +1,13 @@
+dictionaries-common (1.12.11+deb7u1) unstable; urgency=low
+
+  * Improve behavior on debconf database corruption (Closes: #751367):
+    - update-default.in: Use /var/lib/dictionaries-common info as last
+      resource to try getting a default in case of debconf database
+      corruption. This should work better around installation error.
+    - Use a debconf question to warn about debconf database corruption.
+
+ -- Agustin Martin Domingo <agmartin@debian.org>  Fri, 25 Jul 2014 16:48:41 +0200
+
 dictionaries-common (1.12.11) unstable; urgency=low
 
   * debian/control: Add Breaks against ancient myspell-cs-cz,
diff -Nru dictionaries-common-1.12.11/debian/dictionaries-common.templates dictionaries-common-1.12.11+deb7u1/debian/dictionaries-common.templates
--- dictionaries-common-1.12.11/debian/dictionaries-common.templates	2011-04-27 17:54:16.000000000 +0200
+++ dictionaries-common-1.12.11+deb7u1/debian/dictionaries-common.templates	2014-07-25 13:04:48.000000000 +0200
@@ -1,3 +1,19 @@
+Template: dictionaries-common/debconf_database_corruption
+Type: note
+Description: Possible debconf database corruption
+ The setting for "${question}" is missing, but packages providing
+ candidates are installed.
+ .
+ This may be due to corruption in the debconf database. See
+ "/usr/share/doc/dictionaries-common/README.problems" on "Debconf
+ database corruption".
+ .
+ In this case, running "/usr/share/debconf/fix_db.pl" can help to put
+ the debconf database in a consistent state.
+ .
+ Some questions are likely to be asked after this message in order to
+ leave the dictionaries system in a (provisionally) working state.
+
 Template: dictionaries-common/invalid_debconf_value
 Type: note
 _Description: An invalid debconf value [${value}] has been found
@@ -108,4 +124,3 @@
  will not set the default ispell dictionary.
  .
  Use instead 'select-default-ispell' or 'select-default-wordlist' scripts.
-
diff -Nru dictionaries-common-1.12.11/scripts/system/update-default.in dictionaries-common-1.12.11+deb7u1/scripts/system/update-default.in
--- dictionaries-common-1.12.11/scripts/system/update-default.in	2011-06-01 19:40:31.000000000 +0200
+++ dictionaries-common-1.12.11+deb7u1/scripts/system/update-default.in	2014-07-25 13:04:48.000000000 +0200
@@ -74,17 +74,13 @@
   $manual++;
 } else {
   # Question is empty, but $class elements are installed. Two possibilities.
-  if ( -x "/usr/bin/apt-extracttemplates" ){
-    # apt-utils is installed. Other possibility is debconf database corruption.
-    my $shared_question = "shared/packages-$class";
-    print STDERR "$program: Question empty but elements installed for class \"$class\"\n";
-    print STDERR "  $question: return code: \"$ret\", value: \"$value\"\n";
-    print STDERR "  Choices: " . metaget ($question, "choices") . "\n";
-    my ($shared_ret,$shared_owners) = metaget ($shared_question, "owners");
-    print STDERR "  $shared_question: return code: \"$shared_ret\" owners/error: \"$shared_owners\"\n";
-    print STDERR "  Installed elements: " . join(', ',sort keys %{$dictionaries}) . "\n\n";
-    print STDERR "  Please see \"/usr/share/doc/dictionaries-common/README.problems\", section\n";
-    print STDERR "  \"Debconf database corruption\" for recovery info.\n\n";
+  if ( -x "/usr/bin/apt-extracttemplates" ){ # apt-utils is installed.
+    # This seems to be debconf database corruption. Warn loudly about it.
+    my $debconf_dbase_corruption_question = "dictionaries-common/debconf_database_corruption";
+    subst($debconf_dbase_corruption_question,"question",$question);
+    input("high",$debconf_dbase_corruption_question);
+    title ("dictionaries-common: [I:ispell dictionaries:I][W:wordlists:W]");
+    go ();
   } else {
     # apt-utils is not installed, so $class templates may not have been parsed at preconfigure stage.
     # Delay settings until ispell dictionaries/wordlists are configured and their debconf templates parsed.
@@ -96,22 +92,24 @@
 unless ( $manual ){
   # Handle invalid debconf values
   if ( not exists $dictionaries->{$value} ){
-    my @available_keys = ();
-    foreach ( split (/\s*,\s*/, metaget ($question, "choices")) ){
-      # strip leading/trailing whitespace and create a list of available keys
-      s/^\s+//;
-      s/\s+$//;
-      push (@available_keys,$_) if ( defined $dictionaries->{$_} );
-    }
+    # debconf database is presumably corrupted. Try after stored values.
+    my @available_keys = sort {lc $a cmp lc $b} keys %$dictionaries;
     my $choices    = join (', ', sort {lc $a cmp lc $b} @available_keys);
+    print STDERR "$program: Trying to get a default value from \"$choices\"\n";
     my $forced_key = $available_keys[0] ||
       die "$program: Selected [I:ispell dictionary:I][W:wordlist:W]" .
       " \"$value\" \n" .
       "does not correspond to any installed package in the system\n" .
       "and no alternative [I:ispell dictionary:I][W:wordlist:W] could be selected.\n";
-    subst($iquestion,"value",$value);
-    fset ($iquestion,"seen","false");
-    input("high",$iquestion);                # Warn about what happened
+
+    # Warn about what might have happened if not debconf database corruption
+    if ( $value ){
+      subst($iquestion,"value",$value);
+      fset ($iquestion,"seen","false");
+      input("high",$iquestion);
+    }
+
+    # Prepare a selection box to get a default.
     subst ($question, "choices", $choices);  # Put sane values in debconf choices field
     subst ($question, "echoices", $choices); # Put sane values in debconf echoices field
     set ($question, $forced_key);            # Set debconf value to a sane one

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
On Mon, Sep 15, 2014 at 04:33:41PM +0200, Agustin Martin wrote:
> I have been sugested in http://bugs.debian.org/751367 to put some of this
> code in a wheezy point release, and I would like to know your opinion here,

Hi release team,

Since jessie has already been released, this old wheezy pu is no longer
meaningful. 

Closing,

Regards,

-- 
Agustin

--- End Message ---

Reply to: