diff mbox series

[01/14] devtool: deploy-target: pass tar -m to avoid future timestamp warnings

Message ID 20260816194127.86607-2-adrian.freihofer@siemens.com
State New
Headers show
Series devtool: ide-sdk: robust attach-mode debugging and test cleanup | expand

Commit Message

AdrianF Aug. 16, 2026, 7:40 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

devtool deploy-target tars up the build output and pipes it through
ssh to the target, where it's extracted with "tar xv". If the
target's clock is behind the host, tar prints a "time stamp ... is
... in the future" warning per file, since the archived mtimes come
from the host.

Add -m (--touch) so tar sets mtimes to the current time on extraction
instead of restoring them from the archive, avoiding the warning.
Supported identically by GNU tar and BusyBox tar.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 scripts/lib/devtool/deploy.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py
index 8228d9914f..35ec0b1b4d 100644
--- a/scripts/lib/devtool/deploy.py
+++ b/scripts/lib/devtool/deploy.py
@@ -108,9 +108,10 @@  def _prepare_remote_script(deploy, destdir='/', verbose=False, dryrun=False, und
         lines.append('mkdir -p `dirname $manifest`')
         lines.append('mkdir -p $2')
         if verbose:
-            lines.append('    tar xv -C $2 -f - | tee $manifest')
+            # -m avoids "time stamp is in the future" warnings if the target's clock is behind
+            lines.append('    tar xvm -C $2 -f - | tee $manifest')
         else:
-            lines.append('    tar xv -C $2 -f - > $manifest')
+            lines.append('    tar xvm -C $2 -f - > $manifest')
         lines.append('sed -i "s!^./!$2!" $manifest')
     elif not dryrun:
         # Put any preserved files back