[elbe-devel] [PATCH v2 3/4] elbepack: aptpkgutils: drop architecture argument to XMLPackage()

Thomas Weißschuh thomas.weissschuh at linutronix.de
Fri Jun 28 13:52:19 CEST 2024


It is not used anymore.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/aptpkgutils.py            | 2 +-
 elbepack/cdroms.py                 | 4 ++--
 elbepack/commands/check_updates.py | 4 +---
 elbepack/dump.py                   | 2 +-
 elbepack/elbeproject.py            | 2 +-
 5 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/elbepack/aptpkgutils.py b/elbepack/aptpkgutils.py
index c2c376a17beb..ac14789f04a6 100644
--- a/elbepack/aptpkgutils.py
+++ b/elbepack/aptpkgutils.py
@@ -269,7 +269,7 @@ class APTPackage(PackageBase):
 
 
 class XMLPackage(PackageBase):
-    def __init__(self, node, arch):
+    def __init__(self, node):
         hashes = {}
         for h in _apt_hash_mapping.values():
             v = node.et.get(h)
diff --git a/elbepack/cdroms.py b/elbepack/cdroms.py
index ceec8535ab56..2ac12931038e 100644
--- a/elbepack/cdroms.py
+++ b/elbepack/cdroms.py
@@ -68,7 +68,7 @@ def mk_source_cdrom(components, codename,
 
         if component == 'main' and xml is not None:
             for p in xml.node('debootstrappkgs'):
-                pkg = XMLPackage(p, None)
+                pkg = XMLPackage(p)
                 srcpkgs = cache.get_corresponding_source_packages([pkg])
                 for srcpkg, srcpkg_ver in srcpkgs:
                     add_source_pkg(repo, component, cache, srcpkg, srcpkg_ver, forbiddenPackages)
@@ -156,7 +156,7 @@ def mk_binary_cdrom(rfs, arch, codename, init_codename, xml, target):
     if xml is not None:
         cache = get_rpcaptcache(rfs, arch)
         for p in xml.node('debootstrappkgs'):
-            pkg = XMLPackage(p, arch)
+            pkg = XMLPackage(p)
             pkg_id = f'{pkg.name}-{pkg.installed_version}'
             try:
                 deb = cache.download_binary(pkg.name,
diff --git a/elbepack/commands/check_updates.py b/elbepack/commands/check_updates.py
index 270f137da1fa..60e2de82c5e8 100644
--- a/elbepack/commands/check_updates.py
+++ b/elbepack/commands/check_updates.py
@@ -72,8 +72,6 @@ def run_command(argv):
 
     fullp = xml.node('fullpkgs')
 
-    arch = xml.text('project/buildimage/arch', key='arch')
-
     v = virtapt.VirtApt(xml)
 
     for p in fullp:
@@ -88,7 +86,7 @@ def run_command(argv):
     update_packages = []
 
     for p in fullp:
-        xp = XMLPackage(p, arch)
+        xp = XMLPackage(p)
         pname = p.et.text
 
         if not v.has_pkg(xp.name):
diff --git a/elbepack/dump.py b/elbepack/dump.py
index c277193f7975..0954eaa8912c 100644
--- a/elbepack/dump.py
+++ b/elbepack/dump.py
@@ -120,7 +120,7 @@ def check_full_pkgs(pkgs, fullpkgs, cache):
 
     pindex = {}
     for p in fullpkgs:
-        xml_pkg = XMLPackage(p, None)
+        xml_pkg = XMLPackage(p)
         name = p.et.text
         ver = p.et.get('version')
 
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 44a8e7470c24..7d04e988ee3a 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -496,7 +496,7 @@ class ElbeProject:
                 if self.xml is not None:
                     tmp_lst = []
                     for pkg_node in self.xml.node('debootstrappkgs'):
-                        pkg = XMLPackage(pkg_node, self.arch)
+                        pkg = XMLPackage(pkg_node)
                         tmp_lst.append(pkg.name)
                     main_lst = cache.get_corresponding_source_packages(pkg_lst=tmp_lst)
                 components['main'] = (env.rfs, cache, main_lst)

-- 
2.45.2



More information about the elbe-devel mailing list