system: place relative links like certctl does #7063

This commit is contained in:
Franco Fichtner 2023-12-12 08:34:28 +01:00
parent 8c4b1636f8
commit a3f40673ef

View File

@ -90,12 +90,12 @@ def cmd_rehash():
for hash in targets[target_name]:
for seq, filename in enumerate(targets[target_name][hash]):
if target_name == 'blacklisted':
os.symlink(filename, "%s/%s.%d" % (BLACKLISTDESTDIR, hash, seq))
os.symlink(os.path.relpath(filename, BLACKLISTDESTDIR), "%s/%s.%d" % (BLACKLISTDESTDIR, hash, seq))
else:
if hash in targets['blacklisted']:
print("Skipping blacklisted certificate %s (%s)" % (filename, hash))
else:
os.symlink(filename, "%s/%s.%d" % (CERTDESTDIR, hash, seq))
os.symlink(os.path.relpath(filename, CERTDESTDIR), "%s/%s.%d" % (CERTDESTDIR, hash, seq))
if __name__ == '__main__':