(state string)
| 597 | // file from re-triggering a build every cycle. |
| 598 | func driftToMain(syncVer, stateVer, repoVer string) bool { |
| 599 | if alpm.VerCmp(syncVer, stateVer) <= 0 { |
| 600 | return false |
| 601 | } |
| 602 | return repoVer == "" || alpm.VerCmp(syncVer, repoVer) > 0 |
| 603 | } |
| 604 | |
| 605 | // aheadOfUpstream reports whether ver is a version no upstream repo carries, |
| 606 | // which is what a build from main looks like when it picked up a tag staged for |
| 607 | // testing or staging. |
| 608 | // |
| 609 | // Being ahead of stateVer alone is a legitimate drift rebuild, and being ahead of |
| 610 | // syncVer alone is just building before the mirror synced. Both together mean |
| 611 | // nothing upstream has this version, and its dependencies may not be installable. |
| 612 | func aheadOfUpstream(ver, stateVer, syncVer string) bool { |
| 613 | return alpm.VerCmp(ver, stateVer) > 0 && alpm.VerCmp(ver, syncVer) > 0 |
| 614 | } |
no outgoing calls
no test coverage detected