:: Re: [DNG] BUG in desktop-base
Startseite
Nachricht löschen
Nachricht beantworten
Autor: aitor
Datum:  
To: dng
Betreff: Re: [DNG] BUG in desktop-base
Hi Tito,

On 12/4/21 21:35, tito via Dng wrote:
> Hi,
> while trying and retrying buster to beowulf migrations I've seen this error pop up
> a few times. Could this be considered a bug?
>
> Setting up desktop-base (1:3.0) ...
> ... setting up desktop-base
> ... setting up desktop-base
> /var/lib/dpkg/info/desktop-base.postinst: line 30: [: preferred: integer expression expected


Can you give us the content of the following files [*]:

- /sys/class/drm/card*/modes

- /sys/class/graphics/fb*/modes

In the first case, you'll find values like:

1920x1080
1680x1050
1280x1024

...

As a result, the variable ${high} in the line nº30 of the postinst script:

if [ ${high} -ge 720 ]; then

will receive an integer (as expected), that is:

var="1920x1080"
high=${var##*x}  -----> 1080

In the second case, you'll find values like:

U:1920x1080p-0

and they'll be processed in a different way, getting an integeras a result:

var="U:1920x1080p-0"
var=${var##*:}
var=${var%%p-*}
high=${var##*x}  -----> 1080

Aitor.

[*] These files will be taken in consideration only when the content of
the corresponding "status" files located in
each directory matches "connected".