This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-8-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 7d61668c27f482a7e62dc9b994d6505cc14cbcf6 Author: Jarek Potiuk <[email protected]> AuthorDate: Thu Feb 8 18:58:37 2024 +0100 Trims leading `./` from filenames when repackaging reproducible packages (#37253) When we repack tar.gz files, implicitly `./` is added in front of the files being repacked. While this does not change anything when you unpack the files, if you extract individual files by name, you might expect to not have `./` there (this is what happens when helm installs chart from .tgz file). We are stripping the `./` during repackaging now. (cherry picked from commit 8c83e9156ba772f8577e1b32267b7e17adaccc1c) --- dev/breeze/src/airflow_breeze/utils/reproducible.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/breeze/src/airflow_breeze/utils/reproducible.py b/dev/breeze/src/airflow_breeze/utils/reproducible.py index 36a6eeea81..660e01b0a6 100644 --- a/dev/breeze/src/airflow_breeze/utils/reproducible.py +++ b/dev/breeze/src/airflow_breeze/utils/reproducible.py @@ -137,6 +137,8 @@ def repack_deterministically( arcname = entry if prepend_path is not None: arcname = os.path.normpath(os.path.join(prepend_path, arcname)) + if arcname.startswith("./"): + arcname = arcname[2:] tar_file.add(entry, filter=reset, recursive=False, arcname=arcname) os.rename(temp_file, dest_archive) return result
