[elbe-devel] [PATCH 05/11] pkgutils: split get_initrd_uri function

Manuel Traut manut at linutronix.de
Mon Jan 29 13:21:04 CET 2018


to make the code better reusable split the get_initrd_uri function into
two parts. So it's posible to get the uri of any package.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/pkgutils.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
index b985b7a6..65ddc4b7 100644
--- a/elbepack/pkgutils.py
+++ b/elbepack/pkgutils.py
@@ -134,13 +134,17 @@ def get_uri_nonvirtapt(apt_sources, target_pkg, arch):
 
 
 def get_initrd_uri(prj, defs, arch):
+    target_pkg = get_initrd_pkg(prj, defs)
+    return get_uri(prj, defs, arch, target_pkg)
+
+
+def get_uri(prj, defs, arch, target_pkg):
     if arch == "default":
         arch = prj.text("buildimage/arch", default=defs, key="arch")
     suite = prj.text("suite")
 
     apt_sources = get_sources_list(prj, defs)
     apt_keys = get_key_list(prj)
-    target_pkg = get_initrd_pkg(prj, defs)
 
     if virtapt_imported:
         try:
-- 
2.15.1




More information about the elbe-devel mailing list