[elbe-devel] [PATCH 1/7] pkgutils: dont fallback to nonvirtapt code, when virtapt is avail
Torben Hohn
torben.hohn at linutronix.de
Fri Apr 13 14:43:10 CEST 2018
catching any Exception is a bad idea anyways.
Also silent falling back to the old code, which is currently broken
is not useful. This masks problems with not properly authenticated
packages, etc.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/pkgutils.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
index 563935e0..619fa9c2 100644
--- a/elbepack/pkgutils.py
+++ b/elbepack/pkgutils.py
@@ -143,14 +143,10 @@ def get_uri(prj, defs, arch, target_pkg, incl_deps=False):
apt_keys = get_key_list(prj)
if virtapt_imported:
- try:
- if arch == "default":
- arch = prj.text("buildimage/arch", default=defs, key="arch")
- suite = prj.text("suite")
- v = get_virtaptcache(arch, suite, apt_sources, "", apt_keys)
- except Exception as e:
- print("python-apt failed, using fallback code")
- return get_uri_nonvirtapt(apt_sources, target_pkg, arch)
+ if arch == "default":
+ arch = prj.text("buildimage/arch", default=defs, key="arch")
+ suite = prj.text("suite")
+ v = get_virtaptcache(arch, suite, apt_sources, "", apt_keys)
ret = v.get_uri(suite, arch, target_pkg, incl_deps)
return ret
--
2.11.0
More information about the elbe-devel
mailing list