~ubuntu-branches/ubuntu/utopic/dictionaries-common/utopic

« back to all changes in this revision

Viewing changes to scripts/system/update-default.in

  • Committer: Bazaar Package Importer
  • Author(s): Chris Cheney
  • Date: 2010-05-17 20:15:00 UTC
  • mfrom: (1.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100517201500-94c51rzr51ohoi41
Tags: 1.5.5ubuntu1
* Merge from debian unstable.  Remaining changes:
  - scripts/system/dc-debconf-select.pl: Drop default debconf priority
    from 'high' to 'medium'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
  updatedb ($class);
45
45
  my $dictionaries = loaddb ($class);
46
46
 
47
 
  # Set value to Manual if no elements are present for given class
48
 
  unless ( %$dictionaries ) {
49
 
    print STDERR "$program: No $class elements installed. Manual forced\n" if $debug;
50
 
    $value = "Manual forced (No $class elements installed)";
51
 
    set($question,$value);
52
 
    go();
53
 
  }
54
 
 
55
47
  # Check if we are in manual mode
56
48
  if ( $value =~ m/^Manual.*/i ){
57
49
    $ignoresymlinks = "yes";
58
50
    $manual         = "yes";
 
51
  } else {
 
52
    unless( %$dictionaries ) {
 
53
      # Unset value unless Manual or class elements available
 
54
      print STDERR "$program: No Manual mode and no $class elements. $question unset.\n" if $debug;
 
55
      $value = "";
 
56
      set($question,$value);
 
57
      go();
 
58
      $ignoresymlinks = "yes";
 
59
      $manual         = "yes";
 
60
    }
59
61
  }
60
62
 
61
63
  if ( not $ignoresymlinks ) {
114
116
  }
115
117
 
116
118
#[I: This here is only for ispell, not wordlist
117
 
  setsysdefault ($value);
 
119
  if ( $manual ){
 
120
    dico_setsysdefault ($class,"");
 
121
  } else {
 
122
    dico_setsysdefault ($class,$value);
 
123
  }
118
124
 
119
125
  # Printing a plain list with installed ispell dictionaries,
120
126
  open (IDICTS,"> $ispell_dicts_list") ||
121
127
    die "Could not open $ispell_dicts_list for writing\n";
 
128
  print IDICTS ""; # Make sure this is void if no dictionaries available.
122
129
  foreach ( sort keys %{$dictionaries} ){
123
130
    print IDICTS "$_\n";
124
131
  }