From: Michael Tremer Date: Sun, 10 Jan 2010 14:52:24 +0000 (+0100) Subject: naoki: Create symlinks to tools that are needed in chroot. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99600f07bc5338f52633856d3c5120272405cb4b;p=ipfire-3.x.git naoki: Create symlinks to tools that are needed in chroot. If they are not already there, we need to symlink them to the toolchain tools. --- diff --git a/naoki/chroot.py b/naoki/chroot.py index 4a4023ded..7a9279834 100644 --- a/naoki/chroot.py +++ b/naoki/chroot.py @@ -243,15 +243,28 @@ class Environment(object): def _setupToolchain(self): symlinks = ( - "bin/bash", - "bin/sh", - "bin/pwd", + ("bin/bash", "bin/bash"), + ("bin/cat", "bin/cat"), + ("bin/echo", "bin/echo"), + ("bin/stty", "bin/stty"), + ("bin/pwd", "bin/pwd"), + ("bin/sh", "bin/sh"), + # + ("bin/perl", "usr/bin/perl"), + # + ("lib/libgcc_s.so", "usr/lib/libgcc_s.so"), + ("lib/libgcc_s.so.1", "usr/lib/libgcc_s.so.1"), + ("lib/libstdc++.so", "usr/lib/libstdc++.so"), + ("lib/libstdc++.so.6", "usr/lib/libstdc++.so.6"), ) - for symlink in symlinks: - if os.path.exists(self.chrootPath(symlink)): + for src, dst in symlinks: + if os.path.exists(self.chrootPath(dst)): continue - self.log.debug("Creating symlink /%s" % symlink) - os.symlink("/tools_i686/%s" % symlink, self.chrootPath(symlink)) + dir = os.path.dirname(self.chrootPath(dst)) + if not os.path.exists(dir): + util.mkdir(dir) + self.log.debug("Creating symlink /%s" % dst) + os.symlink("/tools_i686/%s" % src, self.chrootPath(dst)) def _mountall(self): """mount 'normal' fs like /dev/ /proc/ /sys"""