Your message dated Tue, 07 May 2013 11:48:28 +0000
with message-id <[email protected]>
and subject line Bug#684601: fixed in numlockx 1.2-5
has caused the Debian Bug report #684601,
regarding numlockx: cleaned up and corrected the xsession script fragment
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
684601: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684601
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: numlockx
Version: 1.2-4
Severity: normal
Tags: patch

Corrected and cleaned up /etc/X11/Xsession.d/55numlockx.
The distributed /etc/default/numlockx may also need a cleanup.

The approximate end result (filtered by reportbug) is shown bellow.
Attached, an incremental patch series:
* Simplify tests and unduplicate file paths.
* Unduplicate another file path.
* Use the shell builtin alternative for /bin/true.
* Removed useless 'SET' variable.
* The numlockx state documentation and the script don't match.
* Resonably handle the undocumented 'keep' state; do nothing.
* Support for 'toogle' state added.
* Untabified.


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-3-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages numlockx depends on:
ii  libc6     2.13-35
ii  libx11-6  2:1.5.0-1
ii  libxext6  2:1.3.1-2
ii  libxtst6  2:1.2.1-1

numlockx recommends no packages.

Versions of packages numlockx suggests:
pn  x-display-manager  <none>

-- Configuration Files:
/etc/X11/Xsession.d/55numlockx changed:
NUMLOCK=auto
cf=/etc/default/numlockx
[ ! -r $cf ] || . $cf
nlx=/usr/bin/numlockx
[ ! -x $nlx ] || {
    case $NUMLOCK in
        # 'keep' is an undocumented state (see `man 1 numlockx'), though
        # /etc/default/numlockx mentions it; do nothing
        keep)
            return 0
            ;;
        off|on|toggle)
            ;;
        *)
            NUMLOCK=on
            ltd=/usr/sbin/laptop-detect
            [ ! -x $ltd ] || ! $ltd || NUMLOCK=off
            ;;
    esac
    $nlx $NUMLOCK || :
}


-- no debconf information


Cheers,

-- 
Cristian
commit 33ebb3fdfee23b12f064314d96c5ebe3663e042d
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 14:53:04 2012 +0200

    Simplify tests and unduplicate file paths.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index e4adad0..4975ffd 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -4,12 +4,11 @@
 NUMLOCK=auto
 
 # Load configuration
-if [ -f /etc/default/numlockx ] ; then
-    . /etc/default/numlockx
-fi
+cf=/etc/default/numlockx
+[ ! -r $cf ] || . $cf
 
 # Toggle numlock if we're not removed
-if [ -x /usr/bin/numlockx ] ; then
+[ ! -x /usr/bin/numlockx ] || {
     case $NUMLOCK in
         off|on)
             SET=1
@@ -20,14 +19,11 @@ if [ -x /usr/bin/numlockx ] ; then
         *)
             SET=1
             NUMLOCK=on
-            if [ -x /usr/sbin/laptop-detect ]; then
-                if /usr/sbin/laptop-detect; then
-                    NUMLOCK=off
-                fi
-            fi
+	    ltd=/usr/sbin/laptop-detect
+            [ ! -x $ltd ] || ! $ltd || NUMLOCK=off
             ;;
     esac
     /usr/bin/numlockx $NUMLOCK || /bin/true
-fi
+}
 
 # EOF

commit 6af532fe82764e60d7c41415528f36f6885c3413
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 15:15:58 2012 +0200

    Unduplicate another file path.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index 4975ffd..4331dc5 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -8,7 +8,8 @@ cf=/etc/default/numlockx
 [ ! -r $cf ] || . $cf
 
 # Toggle numlock if we're not removed
-[ ! -x /usr/bin/numlockx ] || {
+nlx=/usr/bin/numlockx
+[ ! -x $nlx ] || {
     case $NUMLOCK in
         off|on)
             SET=1
@@ -23,7 +24,7 @@ cf=/etc/default/numlockx
             [ ! -x $ltd ] || ! $ltd || NUMLOCK=off
             ;;
     esac
-    /usr/bin/numlockx $NUMLOCK || /bin/true
+    $nlx $NUMLOCK || /bin/true
 }
 
 # EOF

commit 4ad88988a8a50be9461d21d8c7ba0eb810a4ac47
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 15:16:55 2012 +0200

    Use the shell builtin alternative for /bin/true.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index 4331dc5..11e211f 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -24,7 +24,7 @@ nlx=/usr/bin/numlockx
             [ ! -x $ltd ] || ! $ltd || NUMLOCK=off
             ;;
     esac
-    $nlx $NUMLOCK || /bin/true
+    $nlx $NUMLOCK || :
 }
 
 # EOF

commit 7f1d08a10cf3f8a452970b8578dc6eac36ca16ef
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 15:44:28 2012 +0200

    Removed useless 'SET' variable.
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index 11e211f..d7ab86c 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -11,16 +11,11 @@ cf=/etc/default/numlockx
 nlx=/usr/bin/numlockx
 [ ! -x $nlx ] || {
     case $NUMLOCK in
-        off|on)
-            SET=1
-            ;;
-        keep)
-            SET=0
+        off|on|keep)
             ;;
         *)
-            SET=1
             NUMLOCK=on
-	    ltd=/usr/sbin/laptop-detect
+            ltd=/usr/sbin/laptop-detect
             [ ! -x $ltd ] || ! $ltd || NUMLOCK=off
             ;;
     esac

commit 7514c19d57e5c07041a6a54656152c958be8f2f2
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 15:57:12 2012 +0200

    The numlockx state documentation and the script don't match.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index d7ab86c..50a99fa 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -11,6 +11,9 @@ cf=/etc/default/numlockx
 nlx=/usr/bin/numlockx
 [ ! -x $nlx ] || {
     case $NUMLOCK in
+	# FIXME: 'keep' is _not_ a documented state
+	#        'toggle' _is_, but not handled here
+	#        see even /etc/default/numlockx documentation
         off|on|keep)
             ;;
         *)

commit 0bf4eb1cf571d6e5a08a06803b0f7cc7ac917f4c
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 17:46:05 2012 +0200

    Resonably handle the undocumented 'keep' state; do nothing.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index 50a99fa..f791574 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -11,11 +11,14 @@ cf=/etc/default/numlockx
 nlx=/usr/bin/numlockx
 [ ! -x $nlx ] || {
     case $NUMLOCK in
-	# FIXME: 'keep' is _not_ a documented state
-	#        'toggle' _is_, but not handled here
-	#        see even /etc/default/numlockx documentation
-        off|on|keep)
+        # FIXME: 'toggle' _is_ a documented state, but not handled here
+        #        see even /etc/default/numlockx documentation
+        off|on)
             ;;
+	# 'keep' is an undocumented state (see `man 1 numlockx); do nothing
+	keep)
+	    return 0
+	    ;;
         *)
             NUMLOCK=on
             ltd=/usr/sbin/laptop-detect

commit a73df902876f7cdc06aa150ede3af9f7532ae031
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 17:55:11 2012 +0200

    Support for 'toogle' state added.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index f791574..5380af8 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -11,14 +11,13 @@ cf=/etc/default/numlockx
 nlx=/usr/bin/numlockx
 [ ! -x $nlx ] || {
     case $NUMLOCK in
-        # FIXME: 'toggle' _is_ a documented state, but not handled here
-        #        see even /etc/default/numlockx documentation
-        off|on)
-            ;;
-	# 'keep' is an undocumented state (see `man 1 numlockx); do nothing
+	# 'keep' is an undocumented state (see `man 1 numlockx'), though
+        # /etc/default/numlockx mentions it; do nothing
 	keep)
 	    return 0
 	    ;;
+        off|on|toggle)
+	    ;;
         *)
             NUMLOCK=on
             ltd=/usr/sbin/laptop-detect

commit b0f3c3530dcb06978c01abc16fe0235370015bbd
Author: Cristian Ionescu-Idbohrn <[email protected]>
Date:   Sat Aug 11 18:26:39 2012 +0200

    Untabified.
    
    Signed-off-by: Cristian Ionescu-Idbohrn <[email protected]>

diff --git a/debian/55numlockx b/debian/55numlockx
index 5380af8..bc0fbf2 100644
--- a/debian/55numlockx
+++ b/debian/55numlockx
@@ -11,13 +11,13 @@ cf=/etc/default/numlockx
 nlx=/usr/bin/numlockx
 [ ! -x $nlx ] || {
     case $NUMLOCK in
-	# 'keep' is an undocumented state (see `man 1 numlockx'), though
+        # 'keep' is an undocumented state (see `man 1 numlockx'), though
         # /etc/default/numlockx mentions it; do nothing
-	keep)
-	    return 0
-	    ;;
+        keep)
+            return 0
+            ;;
         off|on|toggle)
-	    ;;
+            ;;
         *)
             NUMLOCK=on
             ltd=/usr/sbin/laptop-detect

--- End Message ---
--- Begin Message ---
Source: numlockx
Source-Version: 1.2-5

We believe that the bug you reported is fixed in the latest version of
numlockx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michal Čihař <[email protected]> (supplier of updated numlockx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 07 May 2013 13:17:01 +0200
Source: numlockx
Binary: numlockx
Architecture: source amd64
Version: 1.2-5
Distribution: unstable
Urgency: low
Maintainer: Michal Čihař <[email protected]>
Changed-By: Michal Čihař <[email protected]>
Description: 
 numlockx   - enable NumLock in X11 sessions
Closes: 684601
Changes: 
 numlockx (1.2-5) unstable; urgency=low
 .
   * X session script improvements (Closes: #684601).
   * Switch to dh 9.
Checksums-Sha1: 
 59c070940c39847b4a6bd58efa2aaadda60b6160 1943 numlockx_1.2-5.dsc
 ae663c06cc0715100b11b0ba558b662d18930266 6347 numlockx_1.2-5.debian.tar.gz
 48af5964930903b3fd6565701de9f4ae62ed9701 11004 numlockx_1.2-5_amd64.deb
Checksums-Sha256: 
 b7c2949e3a5da92f276590d5f012a8b1d8983297b76e3e53c521893679336d25 1943 
numlockx_1.2-5.dsc
 f6819945bfcd50acb9a2a43b76c94a08cae2cf4574cf29362f03a2e0eec6654a 6347 
numlockx_1.2-5.debian.tar.gz
 5dceaa145865ed9152500b2a2d2d606c231ae42b4d413e9bc2fcb63103382271 11004 
numlockx_1.2-5_amd64.deb
Files: 
 38d0095614dd6f2b26c0cf9fd3840916 1943 x11 optional numlockx_1.2-5.dsc
 2aa2bda0209d5e02ab93882a80d374e9 6347 x11 optional numlockx_1.2-5.debian.tar.gz
 4a5cb8b2560e73ec5e0d9f6dcbb5ed71 11004 x11 optional numlockx_1.2-5_amd64.deb

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

iQIcBAEBCAAGBQJRiOUGAAoJEGo39bHX+xdNTLwQANMw3oQUB+7/xzB+R/1VpZW4
0UUdUnTf3gopLJQEMgmBySbUeo0zLrY9ioA2M52vstESZ5A0CRqim8x0Q3NBNPmZ
xDRtMa6SHorlj3Fw94bd7yuFpoGBciS8mnqS1C9FgSyi1J6bBVDQ1Dy73/0R+gnX
F5FQyLmANdZ7JyvS8hHzDWRFUSziR9EMLMiva0TCipeLlEfkCOQn0BYdSZNJi0oH
8DrRNd97TpmLbBZ/2m+GV/+71UbwPpVPuge8GLvVj0z2GzGkQ7/AiJUL/ZTk3Plp
ae+JaiPrS8dFINDeuaeG/mlfH3KZyqghVpD/M3ovh+ICDvvb58+9Tj4QHbr58ZoP
Pyxb4UXPuR9izonA+9+RODXgkPaixxSGED8zGNvm54mnnvvcQoIwuC82XSQySvL0
cjFGDQvXgHVjNuapSUmb29xAtefQbbGKNyl08TzwCIVWlNyZ7P+bhd2ryaRM9O6G
k7mnzudz5VZNYzRbMytxmWHOW+70q2/gABealCyfJe9c50Arv7pmlEIvzeSvi8fF
f8XDR/5kW27Za2U1iVDhuFnQFWuVi9MUC6iclwRqS5L8Df3MS9Oa+vZnVo8kfKIH
44ipoUbx1moYgnY+3Il52xa4pATwa83ddQujwZbUbAhB0rMn2P1S2dBW4oDPQqFt
+9VR4xXJGZliLy5p2Usb
=VGDS
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to