Skip to content

Commit 376f22d

Browse files
kettenismarcan
authored andcommitted
firmware: Use hard links in firmware tar files
Signed-off-by: Mark Kettenis <[email protected]>
1 parent e11101d commit 376f22d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/firmware/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def add_file(self, name, data):
3232
ti = tarfile.TarInfo(name)
3333
fd = None
3434
if data.sha in self.hashes:
35-
ti.type = tarfile.SYMTYPE
36-
ti.linkname = os.path.relpath(self.hashes[data.sha], os.path.dirname(name))
35+
ti.type = tarfile.LNKTYPE
36+
ti.linkname = self.hashes[data.sha]
3737
self.manifest.append(f"LINK {name} {ti.linkname}")
3838
else:
3939
ti.type = tarfile.REGTYPE

0 commit comments

Comments
 (0)