[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing wacom-kernel-source on Etch: /var/lib/dpkg/info/wacom-kernel-source.postinst: line 49: [: too many arguments



[ Sometimes it takes a short while for messages to show up on the list.
  Please be patient and don't send the same mail twice within 10
  minutes. ]

On Tue, Apr 17, 2007 at 15:35:35 +0100, Emmanuele Massimi wrote:
> Hi all,
> I've been browsing around, but I couldn't find anything related to this.
> I have been trying to install the wacom-kernel-source package on Etch, but
> it fails with the following error:
>
> Setting up wacom-kernel-source (0.7.4.1-5) ...
>> /var/lib/dpkg/info/wacom-kernel-source.postinst: line 49: [: too many
>> arguments
>> Warning: kernel headers don't match running Linux version.
>> Building wacom modules for Linux _CODE 13262 (this may take a few
>> minutes)...dpkg: error processing wacom-kernel-source (--configure):
>> subprocess post-installation script returned error exit status 2
>> Errors were encountered while processing:
>> wacom-kernel-source
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
>>
>
>
> I firstly thought there was an issue with my kernel headers, but I noticed 
> I
> had the correct ones installed, and then noticed that the actual error was
> in /var/lib/dpkg/info/wacom-kernel-source.postinst: line 49.
>
> Now I am not so experienced, and I don't know exactly what to do, I don't
> even know whether this is a bug. I am also very puzzled by the contents of
> line 49:
>
> [ $kvers = `uname -r` ] || echo "Warning: kernel headers don't match running $kernel version."
>
> which seems to output of the warning message I get during the installation.
>
> Thanks a lot for your time.

You are not the only one with this issue:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=418008

I think the problem is caused by line 48:

kvers="`head -n 1 $ksrc/include/linux/version.h | cut -c 22- | rev | cut -c 2- | rev`"

Up to kernel 2.6.17 the first line of $ksrc/include/linux/version.h used
to be (for my self-compiled kernel):

#define UTS_RELEASE "2.6.17-flo"

Now this information seems to have been shifted to the file
utsrelease.h. This means that the command from line 48 now sets $kvers
to "_CODE 13262" (or some other number) and this of course fails the
version comparison and furthermore causes an error because it contains
whitespace. (It would be better to enclose "$kvers" in quotes in the
test condition, I guess.)

I would try to change line 48 to:

kvers="`head -n 1 $ksrc/include/linux/utsrelease.h | cut -c 22- | rev | cut -c 2- | rev`"
                                      ^^^^^^^^^^^^

and run "dpkg-reconfigure wacom-kernel-source" again.

If this works then we should submit a patch to the bug tracking system,
so please report back here how it goes.

-- 
Regards,     | http://users.icfo.es/Florian.Kulzer
   Florian   |



Reply to: