Aggiunto codice per debug, corretto lancio comando di checksum.

This commit is contained in:
Emiliano Vavassori 2023-01-07 00:52:21 +01:00
parent 2405601d2d
commit 41dcbe1718
1 changed files with 7 additions and 3 deletions

View File

@ -392,22 +392,26 @@ class Build(loaih.RemoteBuild):
def __create_checksum__(self, file):
"""Internal function to create checksum file."""
checksum = subprocess.run(shlex.split(f"md5sum {file}"),
capture_output=True, text=True, encoding='utf-8', check=True)
checksum = subprocess.run(shlex.split(f"md5sum {file}"), shell=True,
capture_output=True, text=True, encoding='utf-8', check=True,
cwd=self.appnamedir)
if checksum.stdout:
with open(f"{file}.md5", 'w', encoding='utf-8') as checkfile:
print(f"DEBUG: writing checksum for {file}.")
checkfile.write(checksum.stdout)
def publish(self):
"""Moves built versions to definitive storage."""
print("DEBUG: reached publish.")
if all(self.built[arch] for arch in self.arch):
# All files are already present in the full_path
return
os.chdir(self.appnamedir)
# Two cases here: local and remote storage_path.
if self.remoterepo:
# Remote first.