Bug#1005102: sane-utils.postinst: 65: [: /var/lib/saned: unexpected operator

2022-02-07 Thread Jörg Frings-Fürst
tags 1005102 + pending
thanks


Hello Florent,


many thanks for your bug report.

Ich habe leider zum testen nur Installationen in einer frischen sid VM
durchgeführt.  ️


CU
Jörg



-- 
New:
GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB  30EE 09F8 9F3C 8CA1 D25D
GPG key (long) : 09F89F3C8CA1D25D
GPG Key: 8CA1D25D


Jörg Frings-Fürst
D-54470 Lieser

git:  https://jff.email/cgit/


Threema: SYR8SJXB
Skype: joergpenguin
Telegram: @joergfringsfuerst


My wish list: 
 - Please send me a picture from the nature at your home.




Am Montag, dem 07.02.2022 um 11:15 +0100 schrieb Florent Rougon:
> Package: sane-utils
> Version: 1.1.1-1
> Severity: normal
> 
> Hello,
> 
> There is a syntax error in /var/lib/dpkg/info/sane-utils.postinst
> which
> causes the following message to be printed:
> 
> /var/lib/dpkg/info/sane-utils.postinst: 65: [: /var/lib/saned:
> unexpected operator
> 
> I could suggest a fix, however I'm not quite sure of the intent
> (regarding the test). The problematic code is the first line of:
> 
>     if [ ! -d /var/lib/saned saned ] ; then
> usermod -d /var/lib/saned saned
>     fi
> 
> AFAIK:
> 
> 1) The -d test operator takes only one argument.
> 
> 2) The negation operator '!' should be before ' [' in POSIX shell
> (note
>    the space).
> 
> 3) I'm not sure you want the '!' at all here (but haven't read the
> rest
>    of this postinst).
> 
> Thanks.
> 
> -- System Information:
> Debian Release: bookworm/sid
>   APT prefers unstable-debug
>   APT policy: (500, 'unstable-debug'), (500, 'unstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 5.15.0-3-amd64 (SMP w/8 CPU threads)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
> LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
> 
> Versions of packages sane-utils depends on:
> ii  adduser    3.118
> ii  debconf [debconf-2.0]  1.5.79
> ii  init-system-helpers    1.61
> ii  libavahi-client3   0.8-5
> ii  libavahi-common3   0.8-5
> ii  libc6  2.33-5
> ii  libieee1284-3  0.2.11-14
> ii  libjpeg62-turbo    1:2.1.2-1
> ii  libpng16-16    1.6.37-3
> ii  libsane1   1.1.1-1
> ii  libsystemd0    250.3-2
> ii  libusb-1.0-0   2:1.0.25-1
> ii  libxml2    2.9.12+dfsg-5+b1
> ii  lsb-base   11.1.0
> ii  update-inetd   4.51
> 
> sane-utils recommends no packages.
> 
> Versions of packages sane-utils suggests:
> ii  avahi-daemon  0.8-5
> ii  unpaper   6.1-2+b2
> 
> -- debconf information:
> * sane-utils/saned_run: false
> * sane-utils/saned_scanner_group: true




signature.asc
Description: This is a digitally signed message part


Bug#1005102: sane-utils.postinst: 65: [: /var/lib/saned: unexpected operator

2022-02-07 Thread Florent Rougon
Package: sane-utils
Version: 1.1.1-1
Severity: normal

Hello,

There is a syntax error in /var/lib/dpkg/info/sane-utils.postinst which
causes the following message to be printed:

/var/lib/dpkg/info/sane-utils.postinst: 65: [: /var/lib/saned: unexpected 
operator

I could suggest a fix, however I'm not quite sure of the intent
(regarding the test). The problematic code is the first line of:

if [ ! -d /var/lib/saned saned ] ; then
usermod -d /var/lib/saned saned
fi

AFAIK:

1) The -d test operator takes only one argument.

2) The negation operator '!' should be before ' [' in POSIX shell (note
   the space).

3) I'm not sure you want the '!' at all here (but haven't read the rest
   of this postinst).

Thanks.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.15.0-3-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages sane-utils depends on:
ii  adduser3.118
ii  debconf [debconf-2.0]  1.5.79
ii  init-system-helpers1.61
ii  libavahi-client3   0.8-5
ii  libavahi-common3   0.8-5
ii  libc6  2.33-5
ii  libieee1284-3  0.2.11-14
ii  libjpeg62-turbo1:2.1.2-1
ii  libpng16-161.6.37-3
ii  libsane1   1.1.1-1
ii  libsystemd0250.3-2
ii  libusb-1.0-0   2:1.0.25-1
ii  libxml22.9.12+dfsg-5+b1
ii  lsb-base   11.1.0
ii  update-inetd   4.51

sane-utils recommends no packages.

Versions of packages sane-utils suggests:
ii  avahi-daemon  0.8-5
ii  unpaper   6.1-2+b2

-- debconf information:
* sane-utils/saned_run: false
* sane-utils/saned_scanner_group: true