From c4e34434a12cdc80ca353dcb7abf9b35b98610b1 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Sat, 3 Jul 2021 22:13:39 +0200 Subject: [PATCH] fetch updates after git pulls, open failed files with o_sync --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index b483e76..b559b7f 100644 --- a/main.go +++ b/main.go @@ -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)