Problems installing/removing console-data-1999.08.29
I was attempting to install and later remove console-data on a powerpc
platform when I got the following:
Removing console-data ...
grep: /proc/hardware: No such file or directory
substr outside of string at /var/lib/dpkg/info/console-data.config line 354, <STDIN> chunk 4.
Please report this bug: no keymaps described for architecture powerpc/ at /var/lib/dpkg/info/console-data.config line 652, <STDIN> chunk 4.
dpkg: error processing console-data (--remove):
subprocess pre-removal script returned error exit status 2
Errors were encountered while processing:
Two issues in there, assuming /proc/hardware exists is
one. (This appears to be noted.) I'm using Ben's 2.2.14 ibook kernel
Second, I was skimming through console-data.config and noticed a
subtle mistake in the Perl code:
in guess_arch() line 357
$subarch =~ s/^powermac|powerbook*|power|imac*|powermac1*$/pmac/;
'*' in a Perl regex means "0 or more of the previous character". I
presume the author was assuming a glob style '*'. The regex should be:
$subarch =~ s/^powermac|powerbook.*|power|imac.*|powermac1.*$/pmac/;
'.' meaning 'any character except newline'