~ubuntu-branches/ubuntu/lucid/dictionaries-common/lucid-201002122359

« back to all changes in this revision

Viewing changes to scripts/system/dc-debconf-select.pl

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2005-09-02 13:39:19 UTC
  • mfrom: (1.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050902133919-1yjcebqd0y0op3tz
Tags: 0.49.2ubuntu1
scripts/system/dc-debconf-select.pl: Drop default question priority to
medium so that the default wordlist question is not asked on initial
installation. (This is a temporary workaround, and leaves a dangling
symlink in /usr/share/dict/words.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
    my $class    = shift;
4
4
    my $priority = shift;
5
5
    my $question = "shared/packages-$class";
 
6
    my @newchoices = ();
 
7
    my @oldchoices = ();
6
8
 
7
 
    $priority = "critical" if not $priority;
 
9
    $priority = "medium" if not $priority;
8
10
    
9
11
    if ( $class eq "ispell" ){
10
12
        $title = "Dictionaries-common: Ispell dictionary"; 
15
17
    my ($errorcode,$pkgowners) = metaget ($question, "owners");
16
18
    return if $errorcode;
17
19
    
18
 
    my @choices = ();
19
20
    foreach (split (/\s*,\s*/, $pkgowners)){
20
21
        my $entry = metaget ("$_/languages", "default");
21
22
        for ( $entry ){ # trim leading/trailing whitespaces the perlfaq way
22
23
            s/^\s+//;
23
24
            s/\s+$//;
24
25
        }
25
 
        push (@choices, split(/\s*,\s*/, $entry));
 
26
        push (@newchoices, split(/\s*,\s*/, $entry));
26
27
    }
27
 
    my $choices = join (', ', sort {lc $a cmp lc $b} @choices);
 
28
    my $choices = join (', ', sort {lc $a cmp lc $b} @newchoices);
28
29
 
29
30
    $question = "dictionaries-common/default-$class";
30
 
    if ($choices ne metaget ($question, "choices")) {
 
31
    @oldchoices = split(/\s*,\s*/,metaget ($question, "choices"));
 
32
    pop @oldchoices;
 
33
    my $oldchoices = join (', ', @oldchoices);
 
34
#    print STDERR "**\nnew:$choices\nold:$oldchoices\n";
 
35
    if ( $choices ne $oldchoices ) {
31
36
        subst ($question, "choices", $choices);
32
37
        fset ($question, "seen", "false");
33
38
    }