[elbe-devel] [PATCH 1/2] Fix problem when building in setsel mode
Philipp Arras
philipp.arras at linutronix.de
Fri Jun 9 16:19:07 CEST 2017
After submitting an xml-file which was generated by "elbe setsel" the build
used to fail with the error:
chroot: failed to run command 'dpkg': No such file or directory
This problem is solved by this patch.
Signed-off-by: Philipp Arras <philipp.arras at linutronix.de>
---
elbepack/efilesystem.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/elbepack/efilesystem.py b/elbepack/efilesystem.py
index 1a81d41..0c1061b 100644
--- a/elbepack/efilesystem.py
+++ b/elbepack/efilesystem.py
@@ -103,9 +103,16 @@ def extract_target( src, xml, dst, log, cache ):
for item in pkglist:
f.write("%s install\n" % item)
- log.chroot (dst.path, "dpkg --clear-selections")
- log.chroot (dst.path, "dpkg --set-selections < %s " % dst.fname (psel))
- log.chroot (dst.path, "dpkg --purge -a")
+ host_arch = log.get_command_out("dpkg --print-architecture").strip()
+ if xml.is_cross (host_arch):
+ ui = "/usr/share/elbe/qemu-elbe/" + str(xml.defs["userinterpr"])
+ if not os.path.exists (ui):
+ ui = "/usr/bin/" + str(xml.defs["userinterpr"])
+ log.do ('cp %s %s' % (ui, dst.fname( "usr/bin" )))
+
+ log.chroot (dst.path, "/usr/bin/dpkg --clear-selections")
+ log.chroot (dst.path, "/usr/bin/dpkg --set-selections < %s " % dst.fname (psel))
+ log.chroot (dst.path, "/usr/bin/dpkg --purge -a")
class ElbeFilesystem(Filesystem):
--
2.1.4
More information about the elbe-devel
mailing list