fetch updates after git pulls, open failed files with o_sync

This commit is contained in:
2021-07-03 22:13:39 +02:00
parent eacb58efbc
commit c4e34434a1

View File

@@ -462,7 +462,7 @@ func isPkgFailed(pkg *BuildPackage) bool {
buildManager.failedMutex.Lock()
defer buildManager.failedMutex.Unlock()
file, err := os.OpenFile(filepath.Join(conf.Basedir.Repo, pkg.FullRepo+"_failed.txt"), os.O_RDWR|os.O_CREATE, os.ModePerm)
file, err := os.OpenFile(filepath.Join(conf.Basedir.Repo, pkg.FullRepo+"_failed.txt"), os.O_RDWR|os.O_CREATE|os.O_SYNC, os.ModePerm)
check(err)
defer func(file *os.File) {
check(file.Close())
@@ -626,6 +626,9 @@ func (b *BuildManager) syncWorker() {
}
}
// fetch updates between sync runs
setupChroot()
pkgBuilds, err := filepathx.Glob(filepath.Join(conf.Basedir.Upstream, "/**/PKGBUILD"))
check(err)