Your message dated Sun, 15 Nov 2026 17:58:25 +0000
with message-id <[email protected]>
and subject line Bug#1115548: fixed in unattended-upgrades 2.14
has caused the Debian Bug report #1115548,
regarding unattended-upgrades: Should use platform.freedesktop_os_release()
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.)


-- 
1115548: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1115548
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: unattended-upgrades
Version: 2.12
Severity: minor
Tags: patch

Dear Michael, et al,

/usr/bin/unattended-upgrade runs three lsb_release subprocesses to
determine distro info.

It would be better to use Python's platform.freedesktop_os_release()
instead for the following reasons:
  * Uses Python module instead of external command
  * Does not use the "global" statement
  * Implementation has 12 fewer lines
  * Faster

Untested patch below.

Thank you!
Daniel Lewart
Urbana, Illinois

diff -ru a/unattended-upgrade b/unattended-upgrade
--- a/unattended-upgrade        2025-08-27 05:10:50.000000000 -0500
+++ b/unattended-upgrade        2025-09-18 00:00:00.000000000 -0500
@@ -47,8 +47,9 @@
 import locale
 import logging
 import logging.handlers
-import re
 import os
+import platform
+import re
 import select
 import signal
 import socket
@@ -112,24 +113,11 @@
 USERS = "/usr/bin/users"
 
 
-# no py3 lsb_release in debian :/
-DISTRO_CODENAME = ""  # type: str
-DISTRO_DESC = ""  # type: str
-DISTRO_ID = ""  # type: str
-
-
-def init_distro_info():
-    global DISTRO_CODENAME, DISTRO_DESC, DISTRO_ID
-    DISTRO_CODENAME = subprocess.check_output(
-        ["lsb_release", "-c", "-s"], universal_newlines=True).strip()
-    DISTRO_DESC = subprocess.check_output(
-        ["lsb_release", "-d", "-s"], universal_newlines=True).strip()
-    DISTRO_ID = subprocess.check_output(
-        ["lsb_release", "-i", "-s"], universal_newlines=True).strip()
-
-
 # init global distro info
-init_distro_info()
+info = platform.freedesktop_os_release()
+DISTRO_CODENAME = info["VERSION_CODENAME"]    # type: str
+DISTRO_DESC     = info["PRETTY_NAME"]         # type: str
+DISTRO_ID       = str.capitalize(info["ID"])  # type: str
 
 
 # Number of days before release of devel where we enable unattended

--- End Message ---
--- Begin Message ---
Source: unattended-upgrades
Source-Version: 2.14
Done: Michael Vogt <[email protected]>

We believe that the bug you reported is fixed in the latest version of
unattended-upgrades, 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.
Michael Vogt <[email protected]> (supplier of updated unattended-upgrades 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: Sun, 15 Nov 2026 15:41:49 +0100
Source: unattended-upgrades
Built-For-Profiles: noudeb
Architecture: source
Version: 2.14
Distribution: unstable
Urgency: medium
Maintainer: Michael Vogt <[email protected]>
Changed-By: Michael Vogt <[email protected]>
Closes: 767208 1031880 1078049 1102157 1104858 1111238 1114967 1115376 1115548 
1121127 1146138 1150359
Changes:
 unattended-upgrades (2.14) unstable; urgency=medium
 .
   [ Fabio Fantoni ]
   * Fix Package-Whitelist being ignored unless the whitelist is strict
     and add a NEWS entry about it (Closes: #1078049)
   * Fix the excuses logged for kept back packages with a whitelist
   * Fix the log message for auto-removable packages that were not removed
   * Fix --dry-run deleting the list of kept-back packages
   * Add the MailReport values "on-new-change" and "on-upgrade" to avoid
     a daily mail about the same kept back packages
   * Do not crash when the mailer exits without reading the mail
   * Run the AutoFixInterruptedDpkg fix before taking the apt lock, apt
     refuses the lock while dpkg is interrupted so the fix was never run
   * Check for a stop request while trying the upgrade candidates
   * greedy: keep the debs of a retried step until the end, log the
     upgraded packages of an interrupted run, do not list held and
     blacklisted packages as candidates and log "All upgrades installed"
     when a candidate is kept back
   * Move string formatting out of _() calls
   * README: explain the time limit of InstallOnShutdown
   * Import the Italian translation from Ubuntu, complete and update it
   * Update the POT file
   * Document that the reboot checks logged in users only when scheduling
 .
   [ Michael Vogt ]
   * main: rework minimal-steps mode to be greedy: start the first upgrade
     step as soon as a candidate set is found instead of calculating the
     full set of steps up front, this makes the time until the first
     download/install much shorter
   * conffiles: update the list of kept-back packages on failed runs
     too, but not on interrupted runs
   * kernel: update KERNEL_VERSION_REGEXP for newer trixie kernels
     (Closes: #1114967)
   * debian: use os-release and drop the lsb-release dependency and
     build-dependency (Closes: #1115548)
   * many: set min python version to 3.8, modernize pep484
     (Closes: #1150359)
   * data: update Debian config for forky
   * tests: skip the mypy check under autopkgtest (Closes: #1146138)
   * tests: fold upgrade-between-snapshots into the existing autopkgtests,
     drop the --dry-run test already covered by the unit tests, use
     --no-install-recommends and drop -U to speed up the test setup
   * README: explain how to easily follow debian/testing
   * HACKING: add a section about conffiles and ucf
 .
   [ Johan Walles ]
   * Add the MinBatteryLevel option to upgrade on battery power, default
     it to 40% and add a NEWS entry about the new default
 .
   [ Simon Arlott ]
   * Consider conffile prompts to be errors when there's nothing else to do
 .
   [ Olaf Meeuwissen ]
   * Honor the APT::Get::Purge setting when removing packages
 .
   [ Jochen Sprickerhof ]
   * Catch PermissionError when executing on_ac_power (Closes: #1031880)
 .
   [ c99e ]
   * Fix the development-release debug message on stable releases
 .
   [ Alexandre Detiste ]
   * Drop the remaining uses of pycodestyle and pep8
 .
   [ Daniel Lewart ]
   * Update 50unattended-upgrades.Debian for trixie
     (Closes: #1115376, #1111238, #767208)
 .
   [ Jarno Suni ]
   * README: document Remove-Unused-Kernel-Packages and
     Remove-New-Unused-Dependencies
 .
   [ Arturo Rodríguez ]
   * Fix a small typo in README.md
 .
   [ Jean-Pierre Giraud ]
   * Move the French translation of the program to po/fr.po
 .
   [ Baptiste Jammet ]
   * Update the French debconf translation (Closes: #1104858, #1121127)
 .
   [ Pedro Ribeiro ]
   * Update the Portuguese translation (Closes: #1102157)
 .
   [ NorwayFun ]
   * Add the Georgian translation
 .
   [ Ahmed Semih Ozmekik ]
   * Also skip dpkg's translated "Reading database" progress in the mail
Checksums-Sha1:
 aa50b7affdcf3a9c8cd73c9e805a6e942dcaa9a7 1907 unattended-upgrades_2.14.dsc
 35f0431459937f0a7f7a8f16ddcf67fa893e9ccd 155440 unattended-upgrades_2.14.tar.xz
 efd65c7f10f00551f68435678c7e1f7eba86cc9e 9458 
unattended-upgrades_2.14_source.buildinfo
Checksums-Sha256:
 ff80f16fd5ec25a26cc4c743086769c3652970229fb8264b455c4e5d69fa43a6 1907 
unattended-upgrades_2.14.dsc
 2054e3d2321b46cf2744b396af26ac5130226ee44bf851d320d80297f57e6544 155440 
unattended-upgrades_2.14.tar.xz
 3f0c24cf99b598ed99afc753e5997ad429e6bfcb86ae4839eac10dea14f5d7e1 9458 
unattended-upgrades_2.14_source.buildinfo
Files:
 b888738bca93adb52b8e7ae04860f096 1907 admin optional 
unattended-upgrades_2.14.dsc
 06f743f1a888345c41e68bdcce0035af 155440 admin optional 
unattended-upgrades_2.14.tar.xz
 4cf2464f843cd08324ff3b2b09c9b64d 9458 admin optional 
unattended-upgrades_2.14_source.buildinfo

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

iQJDBAEBCAAtFiEE2mxnVNiIdibNBqEomMq7Or1MpZ4FAmr55rQPHG12b0BkZWJp
YW4ub3JnAAoJEJjKuzq9TKWelKEQAN/crmudMbcDivYsIvIv9Mq8cVTI9iD8Lg+t
O16s95Bk2j00x2Q/vlLn0GgBFnYE9EaV5irRVMwf1n+MQvZBQ+wM3gEGGbBxVHip
LkHFNl/8uINp7nHE077p3HpRzFWfqvaIySV2zp01IUd0/HWJn5KLgXdTnNtHye0a
n+DeXKbPt2dmTKe7i0jg8Hh02+mvY683jJHea6mFYX/bloMFidfvjM7dMhCL+sMM
m1fMSXTADzBeifc1FKY6WDTqebKOfP1QPiZWUyj54FsrWyQCfoqXt8fM/NSLq5H8
OwNrbmQNqLWLkMagiE/iV7/m8feKQW+PQl99+X6t1Dd4SVeJbnNIAdZKGH8Pi9bi
opzrD4mMF83khf3feNHvHl7/P/FwTSOow4tDswVUPJUTnAVYoIY513GadW7KnN1E
VbgDhVSBTr5IDOZrq+tCHfcprG0UgvsV+06upaukHxilEzhV43UldxTrFU2p+Bpv
QZPLsUKKLfAJscvyThgmd8ZH4W3U7FiCgJreEM6edWFZfwkxt4YIjhS/SgWOVQF5
aWByft+UYtfzzOOmXt9kHbIhqH/P3X5uKYLUm8eBQN0ljE3/tS73L2/uvQ3sCBBl
inBQkJqs5ViraZhxO03NQklBm1+sC5z7Wzot6OuYwpSI4YtdMSnFv+rz75cCkrB5
JV9JSd1E
=aQj3
-----END PGP SIGNATURE-----

Attachment: pgpdenzLlRjJs.pgp
Description: PGP signature


--- End Message ---

Reply via email to