mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 13:40:48 +00:00
target: do not create shutil in package directory
Do not attempt to create shutil from shutil.in inside PACKAGE_BIN_DIRECTORY as that may not be writable. Instead, create it in the temporary directory and remove it right after installing.
This commit is contained in:
parent
724c0ec8df
commit
cafc0a4bc0
@ -650,7 +650,7 @@ class Target(object):
|
||||
|
||||
def _setup_shutils(self):
|
||||
shutils_ifile = os.path.join(PACKAGE_BIN_DIRECTORY, 'scripts', 'shutils.in')
|
||||
shutils_ofile = os.path.join(PACKAGE_BIN_DIRECTORY, 'scripts', 'shutils')
|
||||
shutils_ofile = os.path.join(tempfile.gettempdir(), 'shutils')
|
||||
shell_path = '/bin/sh'
|
||||
if self.os == 'android':
|
||||
shell_path = '/system/bin/sh'
|
||||
@ -661,7 +661,8 @@ class Target(object):
|
||||
line = line.replace("__DEVLIB_SHELL__", shell_path)
|
||||
line = line.replace("__DEVLIB_BUSYBOX__", self.busybox)
|
||||
ofile.write(line)
|
||||
self._shutils = self.install(os.path.join(PACKAGE_BIN_DIRECTORY, 'scripts', 'shutils'))
|
||||
self._shutils = self.install(shutils_ofile)
|
||||
os.remove(shutils_ofile)
|
||||
|
||||
def _execute_util(self, command, timeout=None, check_exit_code=True, as_root=False):
|
||||
command = '{} {}'.format(self.shutils, command)
|
||||
|
Loading…
x
Reference in New Issue
Block a user