code cleanup; switch to rm_chroot to remove builddir; new linter conf
This commit is contained in:
parent
442b793524
commit
b83c0ecfc8
@ -32,6 +32,8 @@ linters-settings:
|
||||
- '8'
|
||||
- '9'
|
||||
- '10'
|
||||
- '100'
|
||||
- '1000'
|
||||
ignored-functions:
|
||||
- strings.SplitN
|
||||
- os.OpenFile
|
||||
@ -82,6 +84,9 @@ linters:
|
||||
- exhaustruct
|
||||
- forcetypeassert
|
||||
- godox
|
||||
- nakedret
|
||||
- tagalign
|
||||
- maligned
|
||||
# remove for new projects
|
||||
- errname
|
||||
- goerr113
|
||||
|
@ -36,7 +36,7 @@ func housekeeping(repo, march string, wg *sync.WaitGroup) error {
|
||||
buildManager.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
|
||||
continue
|
||||
} else if err != nil {
|
||||
log.Warningf("[HK] Problem fetching %s->%q from db: %v", fullRepo, path, err)
|
||||
log.Warningf("[HK] error fetching %s->%q from db: %v", fullRepo, path, err)
|
||||
continue
|
||||
}
|
||||
|
||||
|
3
utils.go
3
utils.go
@ -132,7 +132,8 @@ func statusID2string(s dbpackage.Status) string {
|
||||
|
||||
func cleanBuildDir(dir, chrootDir string) error {
|
||||
if stat, err := os.Stat(dir); err == nil && stat.IsDir() {
|
||||
err = os.RemoveAll(dir)
|
||||
rmCmd := exec.Command("sudo", "rm_chroot.py", dir)
|
||||
_, err := rmCmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user