mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-26 16:11:56 +02:00
cros_image_to_target: when in chroot, call the chroot tools relative to /
This fixes a problem with chroots named other than 'chroot', but only when running inside the chroot. BUG=chromium-os:19596 TEST=run it inside the chroot Change-Id: I9532fe7762e2d7e277305fb948e5cabc242a5213 Reviewed-on: http://gerrit.chromium.org/gerrit/6597 Tested-by: Zdenek Behan <zbehan@chromium.org> Reviewed-by: Zdenek Behan <zbehan@chromium.org>
This commit is contained in:
parent
7b57a7731d
commit
908a843d78
@ -185,6 +185,9 @@ class CrosEnv(object):
|
||||
return os.path.join(self.cros_root, filename)
|
||||
|
||||
def ChrootPath(self, filename):
|
||||
if os.path.exists('/etc/debian_chroot'):
|
||||
return filename
|
||||
else:
|
||||
return self.CrosUtilsPath(os.path.join('..', '..', 'chroot',
|
||||
filename.strip(os.path.sep)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user