[meta-oe][PATCH 080/109] unattended-upgrades: upgrade 2.9.1 -> 2.13

Khem Raj <[email protected]>
Newsgroups org.openembedded.lists.openembedded-devel
Message-ID <[email protected]>
Minor release. Dropped 0001-setup.py-Disable-autodection-of-modules.patch:
2.13's setup.py already passes both packages=[] and py_modules=[] itself, so
re-adding py_modules=[] produced a "keyword argument repeated" SyntaxError.
Rebased 0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch onto
the new import block and the shifted run() body.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <[email protected]>
---
 ...up.py-Disable-autodection-of-modules.patch | 28 -------------------
 ...de-Remove-distro_info-usage-to-check.patch | 19 ++++++-------
 ...s_2.9.1.bb => unattended-upgrades_2.13.bb} |  3 +-
 3 files changed, 9 insertions(+), 41 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch
 rename meta-oe/recipes-devtools/unattended-upgrades/{unattended-upgrades_2.9.1.bb => unattended-upgrades_2.13.bb} (90%)

diff --git a/meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch
deleted file mode 100644
index ec70dd6570..0000000000
--- a/meta-oe/recipes-devtools/unattended-upgrades/files/0001-setup.py-Disable-autodection-of-modules.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8fd80ead718ffc53d7182b9df6f49974113ff8fc Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Mon, 23 May 2022 11:23:58 -0700
-Subject: [PATCH] setup.py: Disable autodection of modules
-
-This helps to fix build with latest setuptools
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
----
- setup.py | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/setup.py b/setup.py
-index 932bf01..fd5a092 100755
---- a/setup.py
-+++ b/setup.py
-@@ -12,6 +12,7 @@ if __name__ == "__main__":
-         name='unattended-upgrades',
-         version='0.1',
-         scripts=['unattended-upgrade'],
-+        py_modules=[],
-         data_files=[
-             ('../etc/logrotate.d/',
-                 ["data/logrotate.d/unattended-upgrades"]),
--- 
-2.36.1
-
diff --git a/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch
index d39427e9fd..317d0dfe4a 100644
--- a/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch
+++ b/meta-oe/recipes-devtools/unattended-upgrades/files/0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch
@@ -17,24 +17,20 @@ Signed-off-by: Aníbal Limón <[email protected]>
 
 Upstream-Status: Inappropriate
 ---
- unattended-upgrade | 38 --------------------------------------
- 1 file changed, 38 deletions(-)
-
 diff --git a/unattended-upgrade b/unattended-upgrade
-index 802d4d5..3b4e83e 100755
+index b72e59e..8ff0c1c 100755
 --- a/unattended-upgrade
 +++ b/unattended-upgrade
-@@ -83,9 +83,6 @@ import apt
+@@ -89,8 +89,6 @@ import apt
  import apt_inst
  import apt_pkg
  
 -import distro_info
 -
--
- # the reboot required flag file used by packages
- REBOOT_REQUIRED_FILE = "/var/run/reboot-required"
- KEPT_PACKAGES_FILE = "var/lib/unattended-upgrades/kept-back"
-@@ -2061,41 +2058,6 @@ def run(options,             # type: Options
+ # workaround debian #1076097, it's unclear why we get the warning:
+ # "DeprecationWarning: This process (pid=3710789) is multi-threaded,
+ #  use of fork() may lead to deadlocks in the child."
+@@ -2436,42 +2434,6 @@ def run(options,             # type: Options
      if should_stop():
          return UnattendedUpgradesResult(False)
  
@@ -53,7 +49,8 @@ index 802d4d5..3b4e83e 100755
 -        except Exception as e:
 -            logging.warning("Could not figure out development release: %s" % e)
 -        else:
--            if ((devel.series == DISTRO_CODENAME
+-            if ((isinstance(devel, distro_info.DistroRelease)
+-                 and devel.series == DISTRO_CODENAME
 -                 and devel.release is not None
 -                 and devel.release - date.today() > DEVEL_UNTIL_RELEASE)):
 -                syslog.syslog((_("Not running on this development "
diff --git a/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.9.1.bb b/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.13.bb
similarity index 90%
rename from meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.9.1.bb
rename to meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.13.bb
index 3d92f59ff2..9534fd3197 100644
--- a/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.9.1.bb
+++ b/meta-oe/recipes-devtools/unattended-upgrades/unattended-upgrades_2.13.bb
@@ -7,10 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
 
 SRC_URI = "git://github.com/mvo5/unattended-upgrades.git;protocol=https;branch=master \
            file://0001-unattended-upgrade-Remove-distro_info-usage-to-check.patch \
-           file://0001-setup.py-Disable-autodection-of-modules.patch \
            "
 
-SRCREV = "5aff8fa2b5b60b7c11bbfb39c884477e72d11d02"
+SRCREV = "221b1a688ee291fd7e0d116dccb57073b921619a"
 
 
 inherit setuptools3_legacy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.