Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions local_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func srcinfoExists(ctx context.Context,
return fmt.Errorf("unable to generate .SRCINFO: %w - %s", err, stderr)
}

if len(srcinfo) == 0 {
return fmt.Errorf("generated .SRCINFO is empty, check your PKGBUILD for errors")
}

if err := os.WriteFile(srcInfoDir, []byte(srcinfo), 0o600); err != nil {
return fmt.Errorf("unable to write .SRCINFO: %w", err)
}
Expand Down
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ func main() {

defer func() {
if rec := recover(); rec != nil {
fallbackLog.Errorln(rec)
debug.PrintStack()
fallbackLog.Errorln("Panic occurred:", rec)
fallbackLog.Errorln("Stack trace:", string(debug.Stack()))
ret = 1
}

os.Exit(ret)
Expand Down Expand Up @@ -122,7 +123,8 @@ func main() {

defer func() {
if rec := recover(); rec != nil {
fallbackLog.Errorln(rec, string(debug.Stack()))
fallbackLog.Errorln("Panic occurred in DB operation:", rec)
fallbackLog.Errorln("Stack trace:", string(debug.Stack()))
}

dbExecutor.Cleanup()
Expand Down
6 changes: 3 additions & 3 deletions vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func createDevelDB(ctx context.Context, run *runtime.Runtime, dbExecutor db.Exec
for iP := range srcinfos[i].Packages {
wg.Add(1)

go func(i string, iP int) {
run.VCSStore.Update(ctx, srcinfos[i].Packages[iP].Pkgname, srcinfos[i].Source)
go func(baseIndex string, packageIndex int) {
run.VCSStore.Update(ctx, srcinfos[baseIndex].Packages[packageIndex].Pkgname, srcinfos[baseIndex].Source)
wg.Done()
}(i, iP)
}
Expand All @@ -71,5 +71,5 @@ func createDevelDB(ctx context.Context, run *runtime.Runtime, dbExecutor db.Exec
wg.Wait()
run.Logger.OperationInfoln(gotext.Get("GenDB finished. No packages were installed"))

return err
return nil
}