BTS

Issue606

Title install-packages-{office,useful}: More compatibility to dash(1).
Priority bug Status resolved
Superseder Nosy List ft, mika, z3ttacht
Assigned To Topics grml2hd

Created on 2009-01-31.11:12:37 by z3ttacht, last changed 2009-02-03.01:15:57 by mika.

Files
File name Uploaded Type Edit Remove
0001-install-packages-office-useful-Enhancing-dash-1.patch z3ttacht, 2009-01-31.16:55:04 text/x-diff
Messages
msg1797 (view) Author: mika Date: 2009-02-03.01:15:52
We believe that your issue has been closed by the upload of
Version 0.2.14 of grml2hd-utils from Michael Prokop <mika@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 03 Feb 2009 01:17:40 +0100
Source: grml2hd-utils
Binary: grml2hd-utils
Architecture: source all
Version: 0.2.14
Distribution: unstable
Urgency: low
Maintainer: Michael Prokop <mika@grml.org>
Changed-By: Michael Prokop <mika@grml.org>
Description: 
 grml2hd-utils - utilities for a grml system on harddisk
Changes: 
 grml2hd-utils (0.2.14) unstable; urgency=low
 .
   [ Michael Prokop ]
   * Drop 'Latest change' lines in all scripts.
   * Some cleanups (Standard-Version, VCS-headers,...) to make lintian
     happy again.
 .
   [ Alexander Steinböck ]
   * install-packages-{office,useful}: Enhancing dash(1) compatibility
     [Closes: issue606]
   * install-packages-useful: Changed the name Macromedia to Adobe.
     [Closes: issue607]
Checksums-Sha1: 
 1402d67aa93c3f3f41aa88f66a8934832862db93 870 grml2hd-utils_0.2.14.dsc
 df081601432d64c780e3eb5843ca920290aef959 10540 grml2hd-utils_0.2.14.tar.gz
 db8d756fdeaa15a01b26ace0050a98cd96f316f5 11404 grml2hd-utils_0.2.14_all.deb
Checksums-Sha256: 
 002ae064b7933e690b5492a849e389c86a32708e6c9370708ce57dcf1fb62b2e 870 grml2hd-utils_0.2.14.dsc
 5681d4c76709615a925c709abf724400282b9d54e4c561620885881e25a2a966 10540 grml2hd-utils_0.2.14.tar.gz
 298f5f1f2267e59a879147ea08fa69e0681e9f65b8d04c95b2b3025f6224faf8 11404 grml2hd-utils_0.2.14_all.deb
Files: 
 ae7e60f45b20e4b6b8729773262e4e6e 870 grml optional grml2hd-utils_0.2.14.dsc
 2639162d08d219af13db9f0381a64311 10540 grml optional grml2hd-utils_0.2.14.tar.gz
 869afdab8b5fb409bd574e1c7038fef2 11404 grml optional grml2hd-utils_0.2.14_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJh5g22N9T+zficugRAtk5AJ9KohkdHHHbDAgGgASIn3JjIzZ8TwCdE+SM
rBjeFj7WoMVS/llm0YyIqiY=
=bMSF
-----END PGP SIGNATURE-----
msg1792 (view) Author: ft Date: 2009-01-31.17:01:27
I guess this renders as OK now.
msg1791 (view) Author: z3ttacht Date: 2009-01-31.16:55:05
> I'm all for more quoting.
> Always quote variables in POSIX scripts unless you *really* know
> what you're doing.
OK. It's easy to forget about that. Especially when one's living zsh's
way of (shell) life.
msg1790 (view) Author: ft Date: 2009-01-31.16:03:09
Alexander Steinböck <bts@bts.grml.org>:
> -if [[ $1 == '-force' ]]; then
> +if [ $1 = '-force' ]; then

Nevermind my previous ACK...

[snip]
# foo.sh
[ $1 = -force ] && echo yay || echo nay
[snap]

% ./foo.sh
[: 1: =: unexpected operator
nay

So, NACK.
I'm all for more quoting.
Always quote variables in POSIX scripts unless you *really* know what
you're doing.

Regards, Frank
msg1789 (view) Author: ft Date: 2009-01-31.15:45:10
Alexander Steinböck <bts@bts.grml.org>:
> > As per susv3, id only needs to support short options like '-u'.
> > '--user' is a GNU extension. IOW: if you want to enhance
> > portability, stick to sus.
> Thanks for the hint.
> And done.
[...]
> -if [ $UID != 0 ]; then
> +if [ $(id -u) -ne 0 ]; then
[...]
> -   exit -1
> +   exit 1
[...]
> -if [[ $1 == '-force' ]]; then
> +if [ $1 = '-force' ]; then
[...]
> -if [ $UID != 0 ]; then
> +if [ $(id -u) -ne 0 ]; then
[...]
> -   exit -1
> +   exit 1
[...]
> -if [[ $1 == '-force' ]]; then
> +if [ $1 = '-force' ]; then

ACK.
msg1788 (view) Author: z3ttacht Date: 2009-01-31.15:36:27
> As per susv3, id only needs to support short options like '-u'.
> '--user' is a GNU extension. IOW: if you want to enhance
> portability, stick to sus.
Thanks for the hint.
And done.
msg1787 (view) Author: ft Date: 2009-01-31.11:31:43
Alexander Steinböck <bts@bts.grml.org>:
> 
> New submission from Alexander Steinböck <z3ttacht@grml.org>:
> 
> * dash(1) doesn't have the environment parameter `$UID'. Using the
>   command substition `id --user' instead.

NACK.

As per susv3, id only needs to support short options like '-u'.
'--user' is a GNU extension. IOW: if you want to enhance portability,
stick to sus.

> * `exit -1' isn't supported by dash(1) either. Besides, `exit 1' is used
>   througout the rest of the script.

ACK

> * Only `=' is allowed for testing of equality of strings in dash(1).

ACK

Regards, Frank
msg1785 (view) Author: z3ttacht Date: 2009-01-31.11:12:37
* dash(1) doesn't have the environment parameter `$UID'. Using the
  command substition `id --user' instead.

* `exit -1' isn't supported by dash(1) either. Besides, `exit 1' is used
  througout the rest of the script.

* Only `=' is allowed for testing of equality of strings in dash(1).
History
Date User Action Args
2009-02-03 01:15:57mikasetstatus: chatting -> resolved
nosy: mika, ft, z3ttacht
messages: + msg1797
2009-01-31 17:01:27ftsetnosy: mika, ft, z3ttacht
messages: + msg1792
2009-01-31 16:57:50z3ttachtsetfiles: - 0001-install-packages-office-useful-Enhancing-dash-1.patch
nosy: mika, ft, z3ttacht
2009-01-31 16:55:05z3ttachtsetfiles: + 0001-install-packages-office-useful-Enhancing-dash-1.patch
nosy: mika, ft, z3ttacht
messages: + msg1791
2009-01-31 16:03:09ftsetnosy: mika, ft, z3ttacht
messages: + msg1790
2009-01-31 15:45:10ftsetnosy: mika, ft, z3ttacht
messages: + msg1789
2009-01-31 15:37:50z3ttachtsetfiles: - 0001-install-packages-office-useful-Enhancing-dash-1.patch
nosy: mika, ft, z3ttacht
2009-01-31 15:36:30z3ttachtsetfiles: + 0001-install-packages-office-useful-Enhancing-dash-1.patch
nosy: mika, ft, z3ttacht
messages: + msg1788
title: install-packages-{office,useful}:???More compatibility to dash(1). -> install-packages-{office,useful}: More compatibility to dash(1).
2009-01-31 11:31:47ftsetstatus: unread -> chatting
nosy: mika, ft, z3ttacht
messages: + msg1787
title: install-packages-{office,useful}:More compatibility to dash(1). -> install-packages-{office,useful}:???More compatibility to dash(1).
2009-01-31 11:12:37z3ttachtcreate