{"record":{"id":"55ea5055b2bbadf3","repo":"Morganamilo/paru","slug":"pacman-exit-code","errorCode":"{pacman exit code}","errorMessage":"Status: {}","messagePattern":"Status: (.+?)","errorType":"error_code","errorClass":"Status","httpStatus":null,"severity":"error","filePath":"src/install.rs","lineNumber":455,"sourceCode":"\n                if let Err(err) = clean_untracked(config, &path) {\n                    print_error(config.color.error, err);\n                    ret = 1;\n                }\n            }\n        }\n\n        if !self.failed.is_empty() {\n            let failed = self\n                .failed\n                .iter()\n                .map(|f| f.to_string())\n                .collect::<Vec<_>>();\n            bail!(tr!(\"packages failed to build: {}\", failed.join(\"  \")));\n        }\n\n        if ret != 0 {\n            Status::err(ret)\n        } else {\n            Ok(())\n        }\n    }\n\n    fn debug_paths(\n        &mut self,\n        config: &Config,\n        base: &mut Base,\n        pkgdest: &HashMap<String, String>,\n    ) -> Result<HashMap<String, String>> {\n        let mut debug_paths = HashMap::new();\n\n        if config.install_debug {\n            for dest in pkgdest.values() {\n                let file = dest.rsplit('/').next().unwrap();\n\n                match base {","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/install.rs#L437-L473","documentation":"After building AUR packages, build_cleanup checks the result; if packages failed to build it bails with a message listing them, and if the recorded return code is nonzero it wraps it via Status::err(ret), producing 'Status: <pacman exit code>'. This propagates the makepkg/pacman failure exit code as paru's own exit status.","triggerScenarios":"resolve_targets -> build_cleanup after an AUR package build fails: makepkg errors (missing deps, checksum failure, compile error), or the post-build install returning nonzero.","commonSituations":"Out-of-date PKGBUILDs after upstream changes; missing base-devel or makedepends; architecture-specific build failures; corrupted sources cached in ~/.cache/paru.","solutions":["Read the build log above the error to find the failing package and the makepkg error.","Clean the build cache for the package (paru -S --clean or remove ~/.cache/paru/clone/<pkg>) and retry.","Update paru and system packages first (paru -Syu) — stale rebuilds often fix it.","Skip persistently broken packages or pin an older commit of the PKGBUILD."],"exampleFix":"// before\nparu -S brokenpkg   # build fails -> Status: 2\n// after\nparu -Sca && paru -S brokenpkg   # clean build, retry","handlingStrategy":"try-catch","validationCode":"paru -Si <pkg>  # confirm package exists and looks maintained before building","typeGuard":null,"tryCatchPattern":"on nonzero exit after build, run with --clean (paru -S --clean <pkg>) and retry once before reporting","preventionTips":["Keep base-devel installed and system updated","Clean clone/build caches for packages that fail after upgrades","Check comments on the AUR page for known build breakage"],"tags":["build","makepkg","exit-code","aur"],"backgroundTag":"package-build-failed","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"}