{"record":{"id":"36336c0ccb9caefc","repo":"Jguer/yay","slug":"failed-to-parse-srcinfo-w","errorCode":null,"errorMessage":"failed to parse .SRCINFO: %w","messagePattern":"failed to parse \\.SRCINFO: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"local_install.go","lineNumber":80,"sourceCode":"\tcmdArgs *parser.Arguments,\n\tdbExecutor db.Executor,\n) error {\n\taurCache := run.AURClient\n\tnoCheck := strings.Contains(run.Cfg.MFlags, \"--nocheck\")\n\n\tif len(cmdArgs.Targets) < 1 {\n\t\treturn errors.New(gotext.Get(\"no target directories specified\"))\n\t}\n\n\tsrcInfos := map[string]*gosrc.Srcinfo{}\n\tfor _, targetDir := range cmdArgs.Targets {\n\t\tif err := srcinfoExists(ctx, run.CmdBuilder, targetDir); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tpkgbuild, err := gosrc.ParseFile(filepath.Join(targetDir, \".SRCINFO\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"%s: %w\", gotext.Get(\"failed to parse .SRCINFO\"), err)\n\t\t}\n\n\t\tsrcInfos[targetDir] = pkgbuild\n\t}\n\n\tgrapher := dep.NewGrapher(dbExecutor, aurCache, false, settings.NoConfirm,\n\t\tcmdArgs.ExistsDouble(\"d\", \"nodeps\"), noCheck, cmdArgs.ExistsArg(\"needed\"),\n\t\trun.Logger.Child(\"grapher\"))\n\tgraph, err := grapher.GraphFromSrcInfos(ctx, nil, srcInfos)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\topService := sync.NewOperationService(ctx, dbExecutor, run)\n\tvar errs []error\n\ttargets := graph.TopoSortedLayers(func(name string, ii *dep.InstallInfo) error {\n\t\tif ii.Source == dep.Missing {\n\t\t\terrs = append(errs, fmt.Errorf(\"%w: %s %s\", ErrPackagesNotFound, name, ii.Version))","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/Jguer/yay/blob/328f4b4939fb35f38c2f7c7ce3b8638a839bafa5/local_install.go#L62-L98","documentation":"Returned by installLocalPKGBUILD when gosrc.ParseFile fails to parse the .SRCINFO file in a target directory (which srcinfoExists just confirmed exists or generated). The parser error is wrapped, so the message reveals the concrete syntax or format problem — typically malformed key/value lines, bad quoting, or an .SRCINFO produced by an incompatible makepkg version.","triggerScenarios":"Thrown at local_install.go:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the stale .SRCINFO and let yay regenerate it via makepkg --printsrcinfo","Regenerate manually with 'makepkg --printsrcinfo > .SRCINFO' to inspect the file","Update makepkg to a version matching the .SRCINFO format"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"328f4b4939fb35f38c2f7c7ce3b8638a839bafa5","analyzedAt":"2026-09-07T16:45:12.608Z","contentChangedAt":"2026-09-07T16:45:12.608Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}