WS-3282: Correct weblog tar extraction

In the bash product collectors, weblogs were being tarred with the -C flag which first changes the directory, allowing them to untar without any directory prefixes. When moving the image product collector to Python, we needed to add arcname=<path>.name to achieve the same functionality.

This affected cal+image, standalone image, and VLASS coarse cube weblog and artifact tars.

Bad:

>>> weblog_path = Path("/home/dnemergu/temp/pipeline-12345")
>>> with tarfile.open(source_dir / "weblog.tgz", "w:gz") as tar:
...     tar.add(weblog_path)
dnemergu@artanis ~/t/temp> tar -xzf weblog.tgz 
dnemergu@artanis ~/t/temp> ls
home/  weblog.tgz

Good:

>>> weblog_path = Path("/home/dnemergu/temp/pipeline-12345")
>>> with tarfile.open(source_dir / "weblog.tgz", "w:gz") as tar:
...     tar.add(weblog_path, weblog_path.name)
... 
dnemergu@artanis ~/t/temp> tar -xzf weblog.tgz 
dnemergu@artanis ~/t/temp> ls
pipeline-12345/  weblog.tgz
Edited by Daniel Nemergut

Merge request reports

Loading