{"record":{"id":"9d9e7047d030b314","repo":"Morganamilo/paru","slug":"package-list-does-not-match-srcinfo","errorCode":null,"errorMessage":"package list does not match srcinfo","messagePattern":"package list does not match srcinfo","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/install.rs","lineNumber":584,"sourceCode":"            exec::makepkg(config, dir, &args)?\n                .success()\n                .with_context(|| tr!(\"failed to download sources for '{}'\", base))?;\n\n            // pkgver bump\n            let mut args = vec![\"-ofA\"];\n            if !config.keep_src {\n                args.push(\"-C\");\n            }\n            exec::makepkg(config, dir, &args)?\n                .success()\n                .with_context(|| tr!(\"failed to build '{}'\", base))?;\n        }\n\n        printtr!(\"{}: parsing pkg list...\", base);\n        let (pkgdests, version) = parse_package_list(config, dir, pkgdest)?;\n\n        if !base.packages().all(|p| pkgdests.contains_key(p)) {\n            bail!(tr!(\"package list does not match srcinfo\"));\n        }\n\n        let needs_build = needs_build(config, base, &pkgdests, &version);\n        if needs_build {\n            // actual build\n            if config.chroot {\n                let mut extra = Vec::new();\n                if config.repos == LocalRepos::None {\n                    extra.extend(self.built.iter().map(|s| s.as_str()));\n                }\n                self.chroot\n                    .build(\n                        dir,\n                        &extra,\n                        &config.chroot_flags,\n                        &[\"-feA\", \"--noconfirm\", \"--noprepare\", \"--holdver\"],\n                        &env,\n                    )","sourceCodeStart":566,"sourceCodeEnd":602,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/install.rs#L566-L602","documentation":"After running makepkg, build_pkgbuild parses the produced package list from the package destinations and verifies that every package declared in the .SRCINFO was actually built. If any srcinfo package is missing from pkgdests, it bails with 'package list does not match srcinfo', an internal consistency check.","triggerScenarios":"base.packages() contains a package name absent from the parse_package_list result — i.e. makepkg succeeded but did not produce a package file for one or more entries declared in the .SRCINFO (common with conditional packaging or split packages where a sub-package was skipped).","commonSituations":"Split packages where a sub-package's package() function produces nothing due to PKGBUILD bugs; PKGBUILD and .SRCINFO out of sync; makepkg options (e.g. split docs stripping) altering output names; version mismatch causing a differently-named file.","solutions":["Compare the built .pkg.tar.zst names in the destination dir against the packages= array in the PKGBUILD","Re-generate .SRCINFO (makepkg --printsrcinfo) to fix a stale srcinfo cache","Rebuild with --rebuild after cleaning the package directory","Report/fix the PKGBUILD if its package() silently omits a declared sub-package"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// sanity-check that built artifacts cover the packages= array\nlet built: Vec<String> = std::fs::read_dir(pkgdest)?\n    .filter_map(|e| e.ok().map(|e| e.file_name().to_string_lossy().into_owned()))\n    .filter(|n| n.ends_with(\".pkg.tar.zst\"))\n    .collect();\nfor p in declared_packages(&srcinfo) {\n    if !built.iter().any(|b| b.starts_with(&format!(\"{p}-\"))) {\n        eprintln!(\"{p} was not built; PKGBUILD/srcinfo mismatch\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate .SRCINFO whenever a PKGBUILD is edited","Clean the package output directory before rebuilding to avoid stale artifacts","Check split-package PKGBUILDs so every declared sub-package has a package() body","Report upstream PKGBUILDs that silently skip sub-packages"],"tags":["makepkg","srcinfo","invariant","aur"],"backgroundTag":"internal-invariant-violation","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}