[elbe-devel] [PATCH 1/2] Revert "pkgutils: dont fallback to nonvirtapt code, when virtapt is avail"
John Ogness
john.ogness at linutronix.de
Sat Apr 28 02:14:40 CEST 2018
This reverts commit 478b26e08550f1322ec2cb07db26d8fa961054b3.
The fallback code is used when creating the initvm from cdrom.
Removing the fallback broke initvm cration from cdrom.
multiprocessing.managers.RemoteError:
---------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/managers.py", line 207, in handle_request
result = func(c, *args, **kwds)
File "/usr/lib/python2.7/multiprocessing/managers.py", line 386, in create
obj = callable(*args, **kwds)
File "/home/jogness/tmpfs/elbe/elbepack/virtapt.py", line 97, in __init__
self.cache = apt_pkg.Cache()
Error: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The value 'jessie' is invalid for APT::Default-Release as such a release is not available in the sources
---------------------------------------------------------------------------
Signed-off-by: John Ogness <john.ogness at linutronix.de>
---
elbepack/pkgutils.py | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
index 092428cb..81ed9d96 100644
--- a/elbepack/pkgutils.py
+++ b/elbepack/pkgutils.py
@@ -1,6 +1,6 @@
# ELBE - Debian Based Embedded Rootfilesystem Builder
# Copyright (c) 2013-2015, 2017-2018 Manuel Traut <manut at linutronix.de>
-# Copyright (c) 2014-2016, 2018 Torben Hohn <torben.hohn at linutronix.de>
+# Copyright (c) 2014-2016 Torben Hohn <torben.hohn at linutronix.de>
# Copyright (c) 2016 John Ogness <john.ogness at linutronix.de>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -132,10 +132,14 @@ def get_uri(prj, defs, arch, target_pkg, incl_deps=False):
apt_keys = get_key_list(prj)
if virtapt_imported:
- 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)
+ 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)
ret = v.get_uri(suite, arch, target_pkg, incl_deps)
return ret
--
2.11.0
More information about the elbe-devel
mailing list