On Tue, Jan 26, 2021 at 03:59:18PM +0000, Jonathan Wakely wrote:
On 25/01/21 19:58 +0100, Miro Hrončok wrote:
>On 25. 01. 21 19:32, Robbie Harwood wrote:
>>It seems to me that this problem would be better solved by making
>>rebuilds smarter. Instead of building tip of dist-git (which might
>>never have been build), rebuild the last thing that *was* successfully
>>built. There are a number of ways to potentially track this
>>information[2].
>
>Koschei already does that (and hence IMHO makes the problem worse,
>becasue it happily reports the package "green" while the git tip
>fails outright in %prep).
Not for the first time, I wonder why we don't have a git server hook
that rejects a push if it fails %prep. For large packages the %prep is
too slow, but we could at least check for the common mistake of adding
a patch to the .spec and forgetting to git add the actual .patch file.
Why do we allow that, instead of just refusing the push?
Does anybody have a valid reason to want to be able to push a .spec
that refers to a missing .patch file? Surely it's always an accident
(as happened with libreoffice last week) and we should use tooling to
help us avoid such accidents?
I don't think we should do a full %prep (because that sometimes sources
can be huge and people do some preprocessing in %prep that might take
a few minutes). But we should check that Source* and Patch* is defined
and the spec file is syntactically valid. This would go a long way towards
avoiding stupid mistakes, without significant cost.
Zbyszek