Your message dated Sun, 21 Jun 2026 09:21:23 +0000
with message-id <[email protected]>
and subject line Bug#1119875: fixed in powermgmt-base 1.39
has caused the Debian Bug report #1119875,
regarding powermgmt-base: `lspower` broken due to a bad clean-up
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.)


-- 
1119875: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1119875
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: powermgmt-base
Version: 1.38
Severity: important
X-Debbugs-Cc: наб <[email protected]>, [email protected]

Meow!
Some time ago, nab submitted a clean-up patch.  It had rotten in the BTS for
a while, then got applied in a NMU _without testing_.  And it turns out that
the patch is incorrect, breaking `lspower` for probably all use cases.

[~]$ lspower
/usr/bin/lspower: 8: cannot open ./cw2015-battery/online: No such file
/usr/bin/lspower: 13: cannot open ./cw2015-battery/health: No such file
- cw2015-battery (84%)
/usr/bin/lspower: 9: cannot open ./dc-charger/present: No such file
/usr/bin/lspower: 11: cannot open ./dc-charger/status: No such file
/usr/bin/lspower: 12: cannot open ./dc-charger/capacity: No such file
/usr/bin/lspower: 13: cannot open ./dc-charger/health: No such file
- dc-charger (84%)
/usr/bin/lspower: 9: cannot open ./tcpm-source-psy-4-0022/present: No such file
/usr/bin/lspower: 11: cannot open ./tcpm-source-psy-4-0022/status: No such file
/usr/bin/lspower: 12: cannot open ./tcpm-source-psy-4-0022/capacity: No such 
file
/usr/bin/lspower: 13: cannot open ./tcpm-source-psy-4-0022/health: No such file
- tcpm-source-psy-4-0022 (84%)

On this particular machine, the only valid bit of information is that the
battery is at 84%; charger status is wrong.

The power subsystem reports the kind of a device mostly by the presence or
absence of a particular file.  For example, defining a battery as something
that has "capacity" is more reliable than trying a zoology of known "type"s.

Thus, a particular file being absent is not only not an error but the
primary source of information I use.


The patch in question is:
.--------------------------------------------------------------------
commit 2e7b352c7bac543702d221736ed251f0ecadbb68
Author: наб <[email protected]>
Date:   Mon Aug 22 00:54:23 2022 +0200

    Don't spawn 5 cats per PSU in lspower
    
    Also shellcheck-clean

diff --git a/lspower b/lspower
index 2a9f68f..6299500 100755
--- a/lspower
+++ b/lspower
@@ -5,15 +5,15 @@ cd /sys/class/power_supply 2>/dev/null ||
 
 for x in *; do
        [ -e "./$x/type" ] || continue
-       ONLINE=$(cat "./$x/online" 2>/dev/null)
-       PRESENT=$(cat "./$x/present" 2>/dev/null)
-       #TYPE=$(cat "./$x/type" 2>/dev/null)
-       STATUS=$(cat "./$x/status" 2>/dev/null)
-       CAPACITY=$(cat "./$x/capacity" 2>/dev/null)
-       HEALTH=$(cat "./$x/health" 2>/dev/null)
+       read -r ONLINE < "./$x/online" 2>/dev/null
+       read -r PRESENT < "./$x/present" 2>/dev/null
+       #read -r TYPE < "./$x/type" 2>/dev/null
+       read -r STATUS < "./$x/status" 2>/dev/null
+       read -r CAPACITY < "./$x/capacity" 2>/dev/null
+       read -r HEALTH < "./$x/health" 2>/dev/null
        ICON="?"
 
-       if [ "$ONLINE" != 1 -a "$PRESENT" != 1 ]; then
+       if [ "$ONLINE" != 1 ] && [ "$PRESENT" != 1 ]; then
                COLOR='1;30'; ICON=✗
        elif [ -z "$CAPACITY" ]; then
                COLOR="1"; ICON=✓
`--------------------------------------------------------------------

So we have an useless binary (thus severity: important) in a high-popcon
package.  Thus, despite this binary in question being new and thus few
people knowing about it, I'd request a stable update.  For this reason, I'd
make a simple revert for now, with maybe some massaging later.

Thoughts, nab?


Meow!
-- System Information:
Debian Release: 13.1
  APT prefers stable-security
  APT policy: (666, 'stable-security'), (666, 'stable'), (250, 'unstable'), 
(201, 'experimental')
Architecture: arm64 (aarch64)

Kernel: Linux 6.12.48+deb13-arm64 (SMP w/6 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: powermgmt-base
Source-Version: 1.39
Done: Chris Hofstaedtler <[email protected]>

We believe that the bug you reported is fixed in the latest version of
powermgmt-base, 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.
Chris Hofstaedtler <[email protected]> (supplier of updated powermgmt-base 
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: SHA512

Format: 1.8
Date: Sun, 21 Jun 2026 10:53:09 +0200
Source: powermgmt-base
Architecture: source
Version: 1.39
Distribution: unstable
Urgency: medium
Maintainer: Adam Borowski <[email protected]>
Changed-By: Chris Hofstaedtler <[email protected]>
Closes: 1119875
Changes:
 powermgmt-base (1.39) unstable; urgency=medium
 .
   * Team upload, salsa.d.o debian namespace
 .
   [ наб ]
   * lspower: correctly silence errors & clear on ENOENT (Closes: #1119875)
Checksums-Sha1:
 5b677ab4e9e5429ec5cb4526d2086f0812f66a3e 1555 powermgmt-base_1.39.dsc
 f3bb6ff5d51d37bf620de06e819f2b31409072bc 9828 powermgmt-base_1.39.tar.xz
 c53850499c7a2403cc8be3f7ccd9d58083df8a3b 5658 
powermgmt-base_1.39_arm64.buildinfo
Checksums-Sha256:
 9d8f9e964ffcf72eb4f6085b80515403f362113b430078ac0bad6f9f1221b18f 1555 
powermgmt-base_1.39.dsc
 72ddf8426d82a8d24965e8a9ce26741e08331e99cade39e4e2a85b000e6b15d4 9828 
powermgmt-base_1.39.tar.xz
 2100f891392a55168786b03df32a55fed42918140da892f9781ba3cdbb4cf38d 5658 
powermgmt-base_1.39_arm64.buildinfo
Files:
 2cc73b69ac61d5074f5f823684fa79eb 1555 utils optional powermgmt-base_1.39.dsc
 edc23a3d2bd1676c8529210a3738787f 9828 utils optional powermgmt-base_1.39.tar.xz
 2851086c7324b043f81073e76c6e1b2a 5658 utils optional 
powermgmt-base_1.39_arm64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfRrP+tnggGycTNOSXBPW25MFLgMFAmo3pwwACgkQXBPW25MF
LgMAzw/9EYjgxrN30Eca6/moNlNcKSfOBGvU4Jlj0Avea7j1GTQPUpkozmm3Htik
WibrcRtfWbS36MCApO5XnIKSRmBpz+dGs/6Ddi8N+noz28i4PMENqBgtf2wig3ku
sIMw/HGCa86F21MZkES1JynvoD9Zz/nk6fV/LtMR4+ttzVb7perQtRC6ATGVQfvq
YIN8W5z1A3Vbqhfx5rawn/BfELJU29QMCm9RCLD9pJ6K3fvxhB4JdHbjo8IraHks
soQvks7odOalKm57Of23lGgl59dY05kMOv2jNBxKFw+yCb+jo4y/W0oM3vaZMvgx
WMUJFv85L9mmINF/+xUc6qJJuf+bChJMtLXcIsjEUkGcX+shsiR4sK/8azNkwSYI
7lX6J9tihX9x36ibUSZP1zaYrRx5x/B3H2+1qyirSy7W65mKJ0N2NGH6hG9a3RQW
Awgf8Fo8D83cQRMCXquGijWDnt3FPTEfgz0lxRpRPGD+l5oL4LKUwpWp+UMrSKGd
F7ksYnI0Igy8CupVeCiaLsYUknStpRjXn4MZwoy8XJzI0R17N/lYOKOccof1d0py
6AegiEwZgpKXh9zx8P3sXgH9orarz5hUTLLffg31ypQxqDmnXk3mA7qyW6LP294J
iDQEwQM3hvq/v5KjwLRaOeHzv55dCuARQBhY/0OUsWE7/ePgUrI=
=wo/k
-----END PGP SIGNATURE-----

Attachment: pgpH8SchOxoMW.pgp
Description: PGP signature


--- End Message ---

Reply via email to