[elbe-devel] [PATCH 2/3] elbepack: allow retrieval of source packages for one specific version
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Apr 16 15:19:06 CEST 2024
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/aptpkgutils.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/elbepack/aptpkgutils.py b/elbepack/aptpkgutils.py
index f403096cdc8e..d1382298e171 100644
--- a/elbepack/aptpkgutils.py
+++ b/elbepack/aptpkgutils.py
@@ -159,7 +159,11 @@ def get_corresponding_source_packages(cache, pkg_lst=None):
src_set = set()
for pkg in pkg_lst:
- version = cache[pkg].installed or cache[pkg.candidate]
+ if isinstance(pkg, str):
+ version = cache[pkg].installed or cache[pkg.candidate]
+ elif isinstance(pkg, PackageBase):
+ version = cache[pkg.name].versions[pkg.installed_version]
+
src_set.add((version.source_name, version.source_version))
built_using = version.record.get('Built-Using')
--
2.44.0
More information about the elbe-devel
mailing list