phase2: fix relative paths for scripts and files
authorPetr Štetiar <ynezz@true.cz>
Sun, 24 Dec 2023 19:14:14 +0000 (19:14 +0000)
committerPetr Štetiar <ynezz@true.cz>
Sat, 13 Apr 2024 04:17:49 +0000 (06:17 +0200)
commit7d371c4ae28b414e2c4321a88453a97e99093b26
tree4f9a8de64e04d7a2e746d1e86cd40e89dba618bb
parente74dce3085f299c2d8b1a94b09687ae88876ef7c
phase2: fix relative paths for scripts and files

Currently `buildlist` step fails with following:

  ../../../sha2rsync.pl ../../arch-sha256sums bin/packages/aarch64_generic/sha256sums rsynclist
   in dir /builder/aarch64_generic/build/sdk (timeout 1200 secs)
   watching logfiles {}
   argv: [b'../../../sha2rsync.pl', b'../../arch-sha256sums', b'bin/packages/aarch64_generic/sha256sums', b'rsynclist']
   environment:
    ...
    PWD=/builder/aarch64_generic/build/sdk
    ...
  Upon execvpe b'../../../sha2rsync.pl' [b'../../../sha2rsync.pl', b'../../arch-sha256sums', b'bin/packages/aarch64_generic/sha256sums', b'rsynclist'] in environment id 139847367136832
  :Traceback (most recent call last):
  ...
  FileNotFoundError: [Errno 2] No such file or directory: b'../../../sha2rsync.pl'

due to relative paths being off by one:

 worker work dir = /builder/aarch64_cortex-a72/build
 workerdest = "../sha2rsync.pl"
   is absolute path /builder/aarch64_cortex-a72/sha2rsync.pl

thus relative path from:

  FileNotFoundError: [Errno 2] No such file or directory: b'../../../sha2rsync.pl'

in following context:

  PWD=/builder/aarch64_generic/build/sdk
  b'../../../sha2rsync.pl'

is wrong absolute path `/builder/sha2rsync.pl` by one directory level,
thus adjust all those paths accordingly.

Fixes: c3ddb0db167d ("phase2: use sha2rsync.pl for 'targetupload'")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
phase2/master.cfg