debrepack.py ignore .git on checksum calculation

This commit updates the debrepack checksum method
to ignore .git files in the calculation. This issue happens
for packages that have a git directory in the src_path
meta_data.yaml  and even tough we have the same files
the checksum won't match if we are comparing 2 branches
because of the .git files (.gitreview for example won't be the
same).

Test Plan:
Pass: build-pkgs
Pass: build-pkgs --reuse

Story: 2008846
Task: 47236
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I9c5d2f4d268def30abfbd1174e0389d523568c93
This commit is contained in:
Luis Sampaio 2023-01-30 10:36:30 -08:00
parent d39c2bf1fe
commit b8492b5206

View File

@ -351,7 +351,9 @@ class Parser():
if "src_path" in self.meta_data and self.meta_data["src_path"] is not None:
for root, _, files in os.walk(self.meta_data["src_path"]):
for name in files:
# Ignore .git files in the checksum calculation
filenames = filter(lambda f: not f.startswith('.git'), files)
for name in filenames:
files_list.append(os.path.join(root, name))
if "src_files" in self.meta_data: