[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:18771] about [ apt-get upgrade ]
>From:Masatake Sumi
<To :debian-usrs
------------------------------------------------------------
本日、久しぶりにアップデートをしたところ、ダウンロードが終わっ
たあとに、見慣れない画面が出てきて、それから後進まなくなって
しまいました。
ご教授いただけたらと思います。
potato
kaernerl-2.0.36
です。
debian config という画面が出てきて、良くわからなかったので、
すべてOKにして、進んだところ。以下のエラーをはいて、止まって
しまいます。
エラー
-------
Name "main:oldkeymaps" used only once:
possible typo at /tmp/filegDntTD line 168
Syntax error : no argument at /tmp/filegDnTD line 186
E: Sub-process dpkg-preconfig --apt returned on errorcode(2)
E: failure running Script dpkg-preconfig --apt
-------
となります。まったくといっていいほど、解決策がわからないので
よろしくお願いします。
以下に /tmp/filegDnTD を貼り付けてあります。
FILE [ filegDnTD ] 長くすいません!
#!/usr/bin/perl -w
#
# Package contents
#
$keymaps = {
'i386' => {
'azerty' => {
'France' => {
'Without Euro' => 'fr-pc',
'With Euro' => 'fr-latin0',
},
'Belgium' => {
'Standard' => 'be-latin1',
'Wang' => 'wangbe',
'Alternate' => 'be2-latin1',
},
},
'dvorak' => {
'Country-independant ?' => {
'Standard' => 'dvorak',
'ANSI' => 'ANSI-dvorak',
'Left single-handed' => 'dvorak-l',
'Right single-handed' => 'dvorak-r',
'With French and Spanish accents' => 'pc-dvorak-latin1',
},
},
'fgGIod' => {
'Turkey' => {
'trf' => 'trf',
'tr_f-latin5' => 'tr_f-latin5',
},
},
'qwerty' => {
'US' => {
'Standard' => 'us',
'With latin1' => 'us-latin1',
},
'UK' => {
'Standard' => 'uk',
},
'Bulgaria' => {
'Standard' => 'bg',
},
'Brazil' => {
'Standard' => 'br-abnt2',
},
'Canada' => {
'French' => 'cf',
},
'Czech Rep.' => {
'Standard' => 'cz-lat2',
'Programmer' => 'cz-lat2-prog',
},
'Denmark' => {
'Standard' => 'dk',
'Dead keys' => 'dk-latin1',
},
'Spain' => {
'Standard' => 'es',
'CP850' => 'es-cp850',
},
'Estonia' => {
'Standard' => 'et',
'No dead keys' => 'et-nodeadkeys',
},
'Finland' => {
'Standard' => 'fi',
'latin1' => 'fi-latin1',
},
'Greece' => {
'Standard' => 'gr',
},
'Italy' => {
'Standard' => 'it',
},
'Japan' => {
'Standard' => 'jp106',
},
'Netherlands' => {
'Standard' => 'nl',
}
},
'qwertz' => {
'Swiss (french)' => {
'Standard' => 'fr_CH',
'latin1' => 'fr_CH-latin1',
},
'Germany' => {
'Standard' => 'de',
'latin1' => 'de-latin1',
'latin1 - no dead keys' => 'de-latin1-nodeadkeys',
},
'Slovakia' => {
'Standard' => 'sk-qwertz',
'Programmer' => 'sk-prog-qwertz',
},
'Czech Rep.' => {
'Standard' => 'cz-us-qwertz',
},
'sg (?)' => {
'Standard' => 'sg',
'latin1' => 'sg-latin1',
'latin1-lk450' => 'sg-latin1-lk450',
},
'Hungary' => {
'Standard' => 'hu',
},
'Slovenia' => {
'Standard' => 'slovene',
},
'Croatia' => {
'Standard' => 'croat',
},
'Serbia' => {
'Standard' => 'sr',
},
},
},
'sparc' => {
'Type 5' => {
'France' => {
'Standard' => 'sunt5-fr-latin1',
},
'Germany' => {
'Standard' => 'sunt5-de-latin1',
},
'Spain' => {
'Standard' => 'sunt5-es',
},
'Finland' => {
'Standard' => 'sunt5-fi-latin1',
},
'Russia' => {
'Standard' => 'sunt5-ru',
},
'UK' => {
'Standard' => 'sunt5-uk',
},
},
'Type 4' => {
'Spain' => {
'Standard' => 'sunt4-es',
},
},
'dvorak' => {
'Country-independant ?' => {
'Standard' => 'sundvorak',
},
},
'Unknown' => {
'Poland' => {
'Standard' => 'sun-pl',
},
},
},
};
#
# Package history
#
# This is a hash-reference of console-data versions against $keymaps-like
# structures containing descriptions of keymaps not installed any more by
# that version and later ones.
# FIXME: not used for now.
@oldkeymaps = {
'i386:qwertz:Germany:latin1',
'no dead keys:de-latin1-nodeadkeys',
};
# END OF DATAPACKAGE-SPECIFIC PART
# BELOW THIS LINE IS THE GENERIC PART
# This a preliminary debconf script for console-related data.
# (c) 1999, Yann Dirson <dirson@debian.org>
# It has the following limitations that should be addressed:
# - only handles keymap configuration (ie, only does part of kbdconfig's job)
# - does not allow testing keymap before accepting it (REGRESSION).
# - does not allow reloading a default keymap (REGRESSION).
use Debian::DebConf::Client::ConfModule ':all';
die "Syntax error: no argument" if ($#ARGV < 0);
#
# Guess arch
#
$dpkgarch = `dpkg --print-architecture`;
$dpkgarch =~ s/\n//;
# Overrides for testing:
#$dpkgarch = 'sparc';
#$dpkgarch = 'powerpc';
#$dpkgarch = 'm68k';
$SEP = ":";
# Convert Hash into Array of strings for the debconf DB
sub h2a {
my ($hashRef) = @_;
my @array = ();
foreach my $key (keys %$hashRef) {
if (ref ($hashRef->{$key})) {
my @a = h2a($hashRef->{$key});
push (@array, map ("$key$SEP" . $_, @a));
} else {
push (@array, "$key$SEP$hashRef->{$key}");
}
}
return @array;
}
# ...and reverse
sub a2h {
my (@array) = @_;
my $hash = {};
foreach my $item (@array) {
my @path = split (/:/, $item);
if ($#path < 1) {
die "Error in data definition";
}
my $curHash = $hash;
# create the hash hierarchy, leaving the last 2 componants alone
if ($#path >= 2) {
for ($i = 0; $i <= ($#path-2); $i++) {
$elem = $path[$i];
if (! exists ($curHash->{$elem})) {
# create a sub-hash if none is there yet
$curHash->{$elem} = {};
} elsif (ref ($curHash->{$elem}) ne 'HASH') {
# we come here if a description item is too short.
# This is probably a bug in the description (eg. embedded
# comma in a string), so we just throw the old hash
# value and insert a hash instead.
$curHash->{$elem} = {};
}
$curHash = $curHash->{$elem};
}
}
# add the last 2 componants where they belong
$curHash->{$path[-2]} = $path[-1];
}
return $hash;
}
# Add our declarations
sub merge_into {
my ($hash, $confvar) = @_;
my ($code, $ret) = metaget ($confvar, 'choices');
$ret =~ s/latin1, no dead keys/latin1 - no dead keys/;
my @existing = split (/, */, $ret);
my $addedkeymaps = 0;
foreach my $item (h2a($hash)) {
my @found = grep (/^$item$/, @existing);
if ($#found == -1) {
push (@existing, $item);
$addedkeymaps = 1;
}
}
if ($addedkeymaps == 1) {
subst ($confvar, 'choices', join (", ", @existing));
fset_default();
}
return a2h @existing;
}
# Remove our declarations
sub remove_from {
my ($hash, $confvar) = @_;
my ($code, $ret) = metaget ($confvar, 'choices');
$ret =~ s/latin1, no dead keys/latin1 - no dead keys/;
my @existing = split (/, */, $ret);
my @mine = h2a($hash);
my @new = ();
# copy each item not in @mine from @existing to @new
foreach my $item (@existing) {
my @found = grep (/^$item$/, @mine);
if ($#found == -1) {
push (@new, $item);
}
}
subst ($confvar, 'choices', join (", ", @new));
}
sub onelevel {
my ($hash, $confvar, $pState, $nState) = @_;
my ($code, $choice, $newState);
# my (undef, $oldValue) = get ($confvar);
my @choices = keys %$hash;
my $choices = join (', ', @choices);
subst ($confvar, 'choices', $choices);
input ('high', $confvar);
($code, undef) = go;
if ($code == 30) { # "back"
$newState = $pState;
} elsif ($code == 0) {
(undef, $choice) = get ($confvar);
$newState = $nState;
} else {
die "GO returned unhandled code $code";
}
return ($hash->{$choice}, $newState);
}
# BELOW THIS LINE IS STUFF FOR ALL KEYMAP PROVIDERS
sub fset_default {
fset ('shared/keymap/layout', 'isdefault', 'true');
fset ('shared/keymap/country', 'isdefault', 'true');
fset ('shared/keymap/variant', 'isdefault', 'true');
}
# The real config engine
sub configure {
$state=1;
LOOP: while ($state != 99) {
($state == 1) && do { # get_layout
($countriesRef, $state) =
onelevel ($keymaps->{$dpkgarch}, 'shared/keymap/layout', 1, 2);
# if ($ret eq "back") {
# previous_module;
# exit;
# }
next LOOP;
};
($state == 2) && do { # get_country
($variantsRef, $state) =
onelevel ($countriesRef, 'shared/keymap/country', 1, 3);
next LOOP;
};
($state == 3) && do { # get_variant
(undef, $state) =
onelevel ($variantsRef, 'shared/keymap/variant', 2, 99);
(undef, $variant) = get ('shared/keymap/variant');
$keymapFilename = $variantsRef->{$variant};
set ('shared/keymap/keymap_filename', $keymapFilename);
next LOOP;
};
}
}
# GO !
if ($ARGV[0] eq 'configure') {
capb ('backup');
$keymaps = merge_into ($keymaps, 'shared/keymap/keymap');
}
if ($ARGV[0] eq 'configure' || $ARGV[0] eq 'reconfigure') {
configure();
}
if ($ARGV[0] eq 'X-deconfigure') {
$confvar = 'shared/keymap/keymap';
# I no longer claim this variable.
unregister ($confvar);
my ($code, $ret, $layout, $country, $variant, $filename);
($code, $ret) = get ($confvar);
if ($code == 0) {
# Unregister our alternatives
remove_from ($keymaps, $confvar);
# If current choice was one of ours, ask for re-selection
($code, $layout) = get ('shared/keymap/layout');
($code, $country) = get ('shared/keymap/country');
($code, $variant) = get ('shared/keymap/variant');
($code, $filename) = get ('shared/keymap/keymap_filename');
my @found = grep (/^$dpkgarch$SEP$layout$SEP$country$SEP$variant$SEP$filename$/, h2a($keymaps));
if ($#found != -1) {
fset_default();
configure();
}
}
}
-----------
------------------------------------------------------------
MARK
marksumi@xxxxxxxxxxxxxxxxxxxxx