Jguer/yay · error
generated .SRCINFO is empty, check your PKGBUILD for errors
Error message
generated .SRCINFO is empty, check your PKGBUILD for errors
What it means
Returned by srcinfoExists when 'makepkg --printsrcinfo' exits successfully but produces empty output, meaning no .SRCINFO content could be derived from the PKGBUILD. The guard fires on the empty-string check before any file is written; it usually indicates a PKGBUILD that parses far enough to run but defines no usable package metadata.
Solutions
- Inspect the PKGBUILD for missing or malformed pkgname/pkgver/source fields
- Test with 'makepkg --printsrcinfo | head' to confirm empty output
- Regenerate or fix the PKGBUILD from its upstream source
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at local_install.go:46 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Jguer/yay@328f4b4939 (2026-09-07).
Data as JSON: /api/errors/332d4e0d8f6ceeb9.
Report an issue: GitHub.
Appendix: source
Thrown at local_install.go:46
cmdBuilder exe.ICmdBuilder, targetDir string,
) error {
srcInfoDir := filepath.Join(targetDir, ".SRCINFO")
pkgbuildDir := filepath.Join(targetDir, "PKGBUILD")
if _, err := os.Stat(srcInfoDir); err == nil {
if _, err := os.Stat(pkgbuildDir); err == nil {
return nil
}
}
if _, err := os.Stat(pkgbuildDir); err == nil {
// run makepkg to generate .SRCINFO
srcinfo, stderr, err := cmdBuilder.Capture(cmdBuilder.BuildMakepkgCmd(ctx, targetDir, "--printsrcinfo"))
if err != nil {
return fmt.Errorf("unable to generate .SRCINFO: %w - %s", err, stderr)
}
if srcinfo == "" {
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)
}
return nil
}
return fmt.Errorf("%w: %s", ErrNoBuildFiles, targetDir)
}
func installLocalPKGBUILD(
ctx context.Context,
run *runtime.Runtime,
cmdArgs *parser.Arguments,
dbExecutor db.Executor,
) error {View on GitHub (pinned to 328f4b4939)