#1 Do not store SRPMs for failed builds
Closed by frostyx. Opened by frostyx.
frostyx/prunerepo rm-failed-build-srpm-2  into  master

Download 1.patch

Please see https://pagure.io/copr/copr/issue/619

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.

2 new commits added

  • Do not store SRPMs for failed builds
  • Replace runnecessary regexes with str.endswith

Hey,

thanks for this. The fact is that the clean_copr function belongs to copr_prune_results script cause it is a build-system specificality. Could you, please, move the function to copr_prune_results.py even with the changes here? I will deprecated the --cleancopr and remove it at next major release.

The fact is that the clean_copr function belongs to copr_prune_results script cause it is a build-system specificality. Could you, please, move the function to copr_prune_results.py even with the changes here?

This is IMHO a reasonable request. I've created the https://pagure.io/copr/copr/pull-request/679

@clime, are you interested at least in the first commit?

Replace unnecessary regexes with str.endswith

@clime, are you interested at least in the first commit?
Replace unnecessary regexes with str.endswith

Yes, sure.

@clime, are you interested at least in the first commit?
Replace unnecessary regexes with str.endswith

Yes, sure.

Since it is not related to this topic, I've created PR#2 and closing this one unmerged.

Pull-Request has been closed by frostyx

This PR has been migrated to GitHub as a placeholder issue:
https://github.com/fedora-copr/prunerepo/issues/1

Metadata