Finish what I started with non-/tmp for lintian-ppa

main
Simon Quigley 3 weeks ago
parent 02ee48bfd3
commit 631703b543

@ -30,7 +30,7 @@ SUPPRESSED_LINTIAN_TAGS = [
] ]
BASE_OUTPUT_DIR = "/srv/lubuntu-ci/output" BASE_OUTPUT_DIR = "/srv/lubuntu-ci/output"
LOG_DIR = os.path.join(BASE_OUTPUT_DIR, "logs", "source_builds") LOG_DIR = os.path.join(BASE_OUTPUT_DIR, "logs", "source_builds")
BASE_LINTIAN_DIR = os.path.join(BASE_OUTPUT_DIR, f"lintian.tmp.{str(uuid.uuid4())[:8]}") BASE_LINTIAN_DIR = os.path.join(BASE_OUTPUT_DIR, f".lintian.tmp.{str(uuid.uuid4())[:8]}")
REAL_LINTIAN_DIR = os.path.join(BASE_OUTPUT_DIR, "lintian") REAL_LINTIAN_DIR = os.path.join(BASE_OUTPUT_DIR, "lintian")
os.makedirs(LOG_DIR, exist_ok=True) os.makedirs(LOG_DIR, exist_ok=True)

@ -89,7 +89,8 @@ def rsync(source, destination):
shutil.copy2(src_path, dst_path) shutil.copy2(src_path, dst_path)
def process_sources(url): def process_sources(url):
tmpdir = os. tmpdir = os.path.join(BASE_OUTPUT_DIR, f".lintian.tmp.{str(uuid.uuid4())[:8]}")
os.mkdir(tmpdir)
changes_file = url.split("/")[-1] changes_file = url.split("/")[-1]
logging.info(f"Downloading {changes_file} and friends via dget") logging.info(f"Downloading {changes_file} and friends via dget")
dget_command = ["dget", "-u", url] dget_command = ["dget", "-u", url]
@ -125,6 +126,8 @@ def process_sources(url):
with open(os.path.join(output_path, f"{arch}.txt"), "w") as f: with open(os.path.join(output_path, f"{arch}.txt"), "w") as f:
f.write(lintian_output) f.write(lintian_output)
shutil.rmtree(tmpdir)
with ThreadPoolExecutor(max_workers=30) as executor: with ThreadPoolExecutor(max_workers=30) as executor:
futures = set() futures = set()

Loading…
Cancel
Save