1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

target/pull: Use chmod from busybox

Not all implementations of chmod support the use of `--` so ensure
we use a known implementations from busybox.
This commit is contained in:
Marc Bonnici 2020-07-21 17:15:05 +01:00 committed by setrofim
parent 117686996b
commit 1a02f77fdd

View File

@ -494,7 +494,7 @@ class Target(object):
for source in sources: for source in sources:
with self._xfer_cache_path(source) as device_tempfile: with self._xfer_cache_path(source) as device_tempfile:
self.execute("cp -r -- {} {}".format(quote(source), quote(device_tempfile)), as_root=True) self.execute("cp -r -- {} {}".format(quote(source), quote(device_tempfile)), as_root=True)
self.execute("chmod 0644 -- {}".format(quote(device_tempfile)), as_root=True) self.execute("{} chmod 0644 -- {}".format(self.busybox, quote(device_tempfile)), as_root=True)
do_pull([device_tempfile], dest) do_pull([device_tempfile], dest)
else: else:
do_pull(sources, dest) do_pull(sources, dest)