forked from ALHP/ALHP.GO
fetch updates after git pulls, open failed files with o_sync
This commit is contained in:
5
main.go
5
main.go
@@ -462,7 +462,7 @@ func isPkgFailed(pkg *BuildPackage) bool {
|
|||||||
buildManager.failedMutex.Lock()
|
buildManager.failedMutex.Lock()
|
||||||
defer buildManager.failedMutex.Unlock()
|
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)
|
check(err)
|
||||||
defer func(file *os.File) {
|
defer func(file *os.File) {
|
||||||
check(file.Close())
|
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"))
|
pkgBuilds, err := filepathx.Glob(filepath.Join(conf.Basedir.Upstream, "/**/PKGBUILD"))
|
||||||
check(err)
|
check(err)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user