~ubuntu-branches/ubuntu/karmic/update-manager/karmic-updates

« back to all changes in this revision

Viewing changes to utils/base-installer-1.101ubuntu4/debian/templates-build.pl

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-09-24 18:41:22 UTC
  • Revision ID: james.westby@ubuntu.com-20090924184122-4lowduwf0xiqmfnl
Tags: 1:0.125.3
* DistUpgrade/DistUpgrade.cfg.hardy:
  - fix upgrades from hardy by allowing the removal of sysvutils
* data/glade/UpdateManager.ui:
  - remove dialog title for cache open progress (LP: #435653)
* DistUpgrade/DistUpgradeQuirks.py:
  - add translators hints for some strings (LP: #433116)
* UpdateManager/Core/DistUpgradeFetcherCore.py:
  - fixed typo (thanks to Henrique P. Machado)
* UpdateManager/UpdateManager.py:
  - fix i18n issues with gtkbuilder
* DistUpgrade/DistUpgradeQuirks.py:
  - stop kblueplugd kbluetooth when the upgrade starts to
    avoid them crashing during the upgrade 
    (thanks to Jonathan Riddell)
* UpdateManager/backend/InstallBackendAptdaemon.py
  - setup correct window icon
* data/glade/UpdateManager.ui:
  - switch from unicode … to "..." until the issues with
    gettext is resolved (LP: #434107)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/perl
2
 
use strict;
3
 
use warnings;
4
 
 
5
 
die "must specify arch" if not defined $ARGV[0];
6
 
my $arch = $ARGV[0];
7
 
 
8
 
my %template;
9
 
$template{Fields} = [];
10
 
$template{'Description-Long'} = "";
11
 
 
12
 
sub print_template {
13
 
        foreach ( @{$template{Fields}} ) {
14
 
                print $_ . ": ";
15
 
                if ( ref $template{$_} eq "HASH" ) {
16
 
                        if ( defined $template{$_}->{$arch} ) {
17
 
                                print $template{$_}->{$arch};
18
 
                        } else {
19
 
                                print $template{$_}->{default};
20
 
                        }
21
 
                } else {
22
 
                        print $template{$_};
23
 
                }
24
 
                print "\n";
25
 
        }
26
 
        print $template{'Description-Long'} . "\n";
27
 
 
28
 
        %template = ();
29
 
        $template{Fields} = [];
30
 
        $template{'Description-Long'} = "";
31
 
}
32
 
 
33
 
while ( <STDIN> ) {
34
 
        chomp;
35
 
        if (m/^$/) {
36
 
            print_template;
37
 
        } elsif ( m/^(\w+)(\[(\w+)\])?:\s+(.*)\s*$/ ) {
38
 
                if ( defined $3 ) {
39
 
                        if ( defined $template{$1} and ref $template{$1} ne "HASH" ) {
40
 
                                local $_;
41
 
                                $_ = $template{$1};
42
 
                                $template{$1} = ();
43
 
                                $template{$1}->{default} = $_;
44
 
                        } elsif ( not defined $template{$1} ) {
45
 
                                push ( @{$template{Fields}}, $1 );
46
 
                        }
47
 
                        $template{$1}->{$3} = $4;
48
 
                } else {
49
 
                        $template{$1} = $4;
50
 
                        push ( @{$template{Fields}}, $1 );
51
 
                }
52
 
        } elsif ( ! m/^#/ ) {
53
 
                $template{'Description-Long'} .= $_ . "\n";
54
 
        }
55
 
}
56
 
 
57
 
print_template;
58