{"record":{"id":"53814dce4581d08f","repo":"jdx/mise","slug":"aur-helpers-cannot-install-a-pinned-version-pkg","errorCode":null,"errorMessage":"AUR helpers cannot install a pinned version ('{pkg}')","messagePattern":"AUR helpers cannot install a pinned version \\('(.+?)'\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/aur.rs","lineNumber":180,"sourceCode":"\n    async fn installed(&self, pkgs: &[PackageRequest]) -> Result<Vec<PackageStatus>> {\n        if pkgs.is_empty() {\n            return Ok(vec![]);\n        }\n        Ok(resolve_foreign_packages(pkgs)\n            .await?\n            .into_iter()\n            .map(|package| package.status)\n            .collect())\n    }\n\n    fn supports_version_pins(&self) -> bool {\n        false\n    }\n\n    async fn install(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {\n        if let Some(pkg) = pkgs.iter().find(|pkg| pkg.version.is_some()) {\n            bail!(\"AUR helpers cannot install a pinned version ('{pkg}')\");\n        }\n        let helper = self\n            .helper()\n            .ok_or_else(|| eyre::eyre!(self.unavailable_reason()))?;\n        let args = install_args(pkgs, opts);\n        let command = std::iter::once(helper.to_string())\n            .chain(args.iter().cloned())\n            .collect::<Vec<_>>();\n        if opts.dry_run {\n            miseprintln!(\"{}\", shell_words::join(command));\n            return Ok(());\n        }\n        if crate::system::sudo::is_root() {\n            bail!(\"AUR packages cannot be built as root; run mise as a non-root user\");\n        }\n        crate::system::sudo::ensure_elevation_available(&shell_words::join(&command))?;\n        let mut runner = CmdLineRunner::new(helper);\n        for arg in &args {","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/aur.rs#L162-L198","documentation":"AUR helpers build packages from source at whatever version the AUR currently provides; they cannot install a specific pinned version. The AUR manager declares supports_version_pins() = false and its install() proactively rejects any PackageRequest carrying a version with this error.","triggerScenarios":"Calling the AUR system package manager's install (directly or via upgrade) with a PackageRequest whose version field is Some, e.g. a bootstrap config pinning an AUR package to a version.","commonSituations":"User pins versions of all bootstrap packages uniformly, including AUR ones; porting an apt/brew-style pinned config to an Arch machine using the AUR manager.","solutions":["Remove the version pin from the AUR package request (install unpinned)","Install the pinned version via the official repos with pacman instead if it exists there","Use a different manager/backend that supports version pins","Freeze the version out-of-band (e.g. pin the AUR PKGBUILD in a custom repo/git checkout)"],"exampleFix":"// before\nPackageRequest { name: \"yay\".into(), version: Some(\"12.3.1\".into()) }\n// after\nPackageRequest { name: \"yay\".into(), version: None }","handlingStrategy":"validation","validationCode":"if pkgs.iter().any(|p| p.version.is_some()) && manager == \"aur\" {\n    eprintln!(\"strip version pins before handing requests to the AUR manager\");\n    pkgs.iter_mut().for_each(|p| { p.version = None; });\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep version pins out of AUR package entries in bootstrap config","Route pinned packages to pacman-capable managers","Check supports_version_pins() before building requests per manager"],"tags":["aur","arch","version-pin","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}