forked from ALHP/ALHP.GO
removed alpm lock
This commit is contained in:
5
main.go
5
main.go
@@ -39,7 +39,6 @@ var (
|
|||||||
conf = Conf{}
|
conf = Conf{}
|
||||||
repos []string
|
repos []string
|
||||||
alpmHandle *alpm.Handle
|
alpmHandle *alpm.Handle
|
||||||
alpmLock sync.RWMutex
|
|
||||||
reMarch = regexp.MustCompile(`(-march=)(.+?) `)
|
reMarch = regexp.MustCompile(`(-march=)(.+?) `)
|
||||||
rePkgRel = regexp.MustCompile(`(?m)^pkgrel\s*=\s*(.+)$`)
|
rePkgRel = regexp.MustCompile(`(?m)^pkgrel\s*=\s*(.+)$`)
|
||||||
rePkgFile = regexp.MustCompile(`^(.*)-.*-.*-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$`)
|
rePkgFile = regexp.MustCompile(`^(.*)-.*-.*-(?:x86_64|any)\.pkg\.tar\.zst(?:\.sig)*$`)
|
||||||
@@ -241,7 +240,7 @@ func (b *BuildManager) parseWorker() {
|
|||||||
skipping = true
|
skipping = true
|
||||||
} else if contains(info.MakeDepends, "ghc") || contains(info.MakeDepends, "haskell-ghc") || contains(info.Depends, "ghc") || contains(info.Depends, "haskell-ghc") {
|
} else if contains(info.MakeDepends, "ghc") || contains(info.MakeDepends, "haskell-ghc") || contains(info.Depends, "ghc") || contains(info.Depends, "haskell-ghc") {
|
||||||
// Skip Haskell packages for now, as we are facing linking problems with them,
|
// Skip Haskell packages for now, as we are facing linking problems with them,
|
||||||
// most likely caused by not having a dependency tree implemented yet and building at random.
|
// most likely caused by not having a dependency check implemented yet and building at random.
|
||||||
// https://git.harting.dev/anonfunc/ALHP.GO/issues/11
|
// https://git.harting.dev/anonfunc/ALHP.GO/issues/11
|
||||||
log.Debugf("Skipped %s: haskell package", info.Pkgbase)
|
log.Debugf("Skipped %s: haskell package", info.Pkgbase)
|
||||||
dbLock.Lock()
|
dbLock.Lock()
|
||||||
@@ -595,10 +594,8 @@ func main() {
|
|||||||
setupChroot()
|
setupChroot()
|
||||||
syncMarchs()
|
syncMarchs()
|
||||||
|
|
||||||
alpmLock.Lock()
|
|
||||||
alpmHandle, err = initALPM(filepath.Join(conf.Basedir.Chroot, "root"), filepath.Join(conf.Basedir.Chroot, "/root/var/lib/pacman"))
|
alpmHandle, err = initALPM(filepath.Join(conf.Basedir.Chroot, "root"), filepath.Join(conf.Basedir.Chroot, "/root/var/lib/pacman"))
|
||||||
check(err)
|
check(err)
|
||||||
alpmLock.Unlock()
|
|
||||||
|
|
||||||
go buildManager.syncWorker()
|
go buildManager.syncWorker()
|
||||||
go buildManager.htmlWorker()
|
go buildManager.htmlWorker()
|
||||||
|
2
utils.go
2
utils.go
@@ -455,7 +455,6 @@ func setupMakepkg(march string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func isMirrorLatest(h *alpm.Handle, buildPkg *BuildPackage) (bool, error) {
|
func isMirrorLatest(h *alpm.Handle, buildPkg *BuildPackage) (bool, error) {
|
||||||
alpmLock.Lock()
|
|
||||||
dbs, err := h.SyncDBs()
|
dbs, err := h.SyncDBs()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
@@ -481,7 +480,6 @@ func isMirrorLatest(h *alpm.Handle, buildPkg *BuildPackage) (bool, error) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
alpmLock.Unlock()
|
|
||||||
|
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user