Bug#780381: wesnoth-1.10: Fixup nolog script
Ben Longbons
brlongbons at gmail.com
Fri Mar 13 05:35:17 UTC 2015
Package: wesnoth-1.10
Version: 1:1.10.7-1
Severity: wishlist
Dear Maintainer,
The `wesnoth-1.10-nolog` script would be better written as:
# WTFPLv2
exec ${0%-nolog} "$@" >/dev/null 2>&1
This works in dash and bash; I am not certain about other /bin/sh
implementations.
Changes:
- add `exec` to prevent the shell process from hanging around forever.
This is the issue that caught my attention (pgrep returning multiple
processes unnecessarily is annoying).
- use shell to cut variable suffix instead of an external call to sed.
(minor)
- Expand arguments including spaces correctly.
This is the only per-se bug being fixed, although most people passing
their own arguments to wesnoth would probably not use the nolog script.
- duplicate stdout to stderr instead of opening /dev/null twice.
(minor)
Also, the `wesnoth-nolog` alternatives symlink will ignore the
`wesnoth-x.y-nolog` that it points to and actually run whatever the
`wesnoth` symlink points to, because `$0` does not include the x.y
unless you run realpath. I am not sure how many contortions you have to
go through with update-alternatives to break the pairing or whether it's
even worth caring about.
-- System Information:
Debian Release: 8.0
APT prefers testing
APT policy: (600, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, powerpc, arm64, armhf
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages wesnoth-1.10 depends on:
ii wesnoth-1.10-aoi 1:1.10.7-1
ii wesnoth-1.10-core 1:1.10.7-1+b1
ii wesnoth-1.10-data 1:1.10.7-1
ii wesnoth-1.10-did 1:1.10.7-1
ii wesnoth-1.10-dm 1:1.10.7-1
ii wesnoth-1.10-dw 1:1.10.7-1
ii wesnoth-1.10-ei 1:1.10.7-1
ii wesnoth-1.10-httt 1:1.10.7-1
ii wesnoth-1.10-l 1:1.10.7-1
ii wesnoth-1.10-low 1:1.10.7-1
ii wesnoth-1.10-nr 1:1.10.7-1
ii wesnoth-1.10-sof 1:1.10.7-1
ii wesnoth-1.10-sotbe 1:1.10.7-1
ii wesnoth-1.10-thot 1:1.10.7-1
ii wesnoth-1.10-trow 1:1.10.7-1
ii wesnoth-1.10-tsg 1:1.10.7-1
ii wesnoth-1.10-ttb 1:1.10.7-1
ii wesnoth-1.10-utbs 1:1.10.7-1
Versions of packages wesnoth-1.10 recommends:
ii wesnoth-1.10-music 1:1.10.7-1
wesnoth-1.10 suggests no packages.
-- no debconf information
More information about the Pkg-games-devel
mailing list