{"record":{"id":"c0fd3b8a53e558a0","repo":"Morganamilo/paru","slug":"package-does-not-have-an-update","errorCode":null,"errorMessage":"package does not have an update","messagePattern":"package does not have an update","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/devel.rs","lineNumber":490,"sourceCode":"    } else {\n        None\n    }\n}\n\nasync fn has_update(style: Style, git: &str, flags: &[String], url: &RepoInfo) -> Result<()> {\n    let sha = ls_remote(style, git, flags, url.url.clone(), url.branch.as_deref()).await?;\n    debug!(\n        \"devel check {}: '{}' == '{}' different: {}\",\n        url.url,\n        url.commit,\n        sha,\n        url.commit != sha\n    );\n    if sha != *url.commit {\n        return Ok(());\n    }\n\n    bail!(tr!(\"package does not have an update\"))\n}\n\npub async fn fetch_devel_info(\n    config: &Config,\n    bases: &[Base],\n    srcinfos: &HashMap<String, Srcinfo>,\n) -> Result<DevelInfo> {\n    let mut devel_info = DevelInfo::default();\n\n    let mut parsed = Vec::new();\n    let mut futures = Vec::new();\n\n    for base in bases {\n        let srcinfo = match base {\n            Base::Aur(_) => srcinfos.get(base.package_base()),\n            Base::Pkgbuild(c) => Some(c.srcinfo.as_ref()),\n        };\n","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/devel.rs#L472-L508","documentation":"src/devel.rs:490 (has_update) compares the locally recorded VCS commit with the latest commit resolved from the remote. If they are equal — or the caller reaches this point with no divergence — the function bails with \"package does not have an update\". It is a control-flow signal (bail used as a sentinel), not a malfunction: the devel package is already at the newest commit.","triggerScenarios":"Calling has_update for a VCS package whose fetched remote SHA equals the stored sha (url.commit == sha). Any caller that treats every Result from has_update as success will see this as an error even though it means 'nothing to do'.","commonSituations":"Running an update sweep where all -git packages are already current; re-running a devel check shortly after a previous update; a caller that forgets this specific bail is the expected no-update outcome.","solutions":["Treat this message as 'up to date' — match on the error string or refactor the API to return Ok(false)/Option instead of bailing.","No action is needed for the package itself; it already has the latest commit.","If you expected an update, verify the cached devel info (url.commit) is fresh — delete the stored devel info cache so it is re-fetched.","Confirm git ls-remote returned the real remote HEAD (see error 17/18 paths) and not a stale/cached value."],"exampleFix":"// before: treating any error as failure\nmatch devel::has_update(&pkg).await {\n    Ok(_) => update(),\n    Err(e) => return Err(e),\n}\n\n// after: treat \"no update\" sentinel as up-to-date\nmatch devel::has_update(&pkg).await {\n    Ok(_) => update(),\n    Err(e) if e.to_string().contains(\"package does not have an update\") => { /* up to date */ }\n    Err(e) => return Err(e),\n}","handlingStrategy":"try-catch","validationCode":"// Compare commits yourself before calling, to anticipate the no-update bail\nlet up_to_date = stored_devel_info\n    .get(&pkg.name)\n    .map(|info| info.commit == latest_remote_sha)\n    .unwrap_or(true);","typeGuard":null,"tryCatchPattern":"match devel::has_update(&pkg).await {\n    Ok(_) => update(pkg),\n    Err(e) if e.to_string().contains(\"package does not have an update\") => {\n        // expected sentinel: package is current, not a failure\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Treat this bail string as 'up to date' in any caller of has_update.","Refresh the stored devel-info cache periodically so comparisons use fresh SHAs.","When writing new callers, prefer matching on this message over blanket error propagation.","Log it at info level, not as an error, in update sweeps."],"tags":["vcs","devel-package","no-op","sentinel-error"],"backgroundTag":"up-to-date-no-op","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"}