Notes for myself - we can modify
...
to
rel_rpms_paths = [relpath.strip('"') for relpath in stdout if not is_srpm(relpath) and is_rpm_that_dir(relpath)]
I started implementing this option here https://pagure.io/fork/frostyx/prunerepo/c/da1267805e84d299ba6530917b222bec12c6bb26?branch=rm-failed-build-srpm and successfully removed SRPM for a failed build. But then I figured out, that later in clean_copr() function, we remove the whole build directory if there is neither RPM nor SRPM in it. I started fresh and implemented such behavior with vastly fewer changes.
Is this a desired behavior @msuchy? Or do we want to remove just SRPM file and preserve the build directory without it? In such case, we would have to discard this PR and finish the patch above. Neither will take long, so we can comfortably decide, which one we prefer.
Please see https://pagure.io/copr/copr/issue/619
I started implementing this option here https://pagure.io/fork/frostyx/prunerepo/c/da1267805e84d299ba6530917b222bec12c6bb26?branch=rm-failed-build-srpm and successfully removed SRPM for a failed build. But then I figured out, that later in
clean_copr()function, we remove the whole build directory if there is neither RPM nor SRPM in it. I started fresh and implemented such behavior with vastly fewer changes.Is this a desired behavior @msuchy? Or do we want to remove just SRPM file and preserve the build directory without it? In such case, we would have to discard this PR and finish the patch above. Neither will take long, so we can comfortably decide, which one we prefer.