Jguer/yay · error
cannot find PKGBUILD and .SRCINFO in directory
Error message
cannot find PKGBUILD and .SRCINFO in directory: %s
What it means
The wrapped form of ErrNoBuildFiles returned at the end of srcinfoExists: the target directory has no .SRCINFO (or it couldn't be generated) and no PKGBUILD, so neither build file required for a local install is present. The %s names the offending directory. It is the terminal fall-through of the file-presence checks and generation attempt.
Solutions
- Point yay -B at a directory that actually contains a PKGBUILD
- Clone the PKGBUILD from the AUR or ABS into the target directory
- Verify the path for typos or trailing characters
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at local_install.go:56 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/89934d0310336f95.
Report an issue: GitHub.
Appendix: source
Thrown at local_install.go:56
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 {
aurCache := run.AURClient
noCheck := strings.Contains(run.Cfg.MFlags, "--nocheck")
if len(cmdArgs.Targets) < 1 {
return errors.New(gotext.Get("no target directories specified"))
}
srcInfos := map[string]*gosrc.Srcinfo{}
for _, targetDir := range cmdArgs.Targets {
if err := srcinfoExists(ctx, run.CmdBuilder, targetDir); err != nil {View on GitHub (pinned to 328f4b4939)