Morganamilo/paru · error

package list does not match srcinfo

Error message

package list does not match srcinfo

What it means

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.

Solutions

  1. Compare the built .pkg.tar.zst names in the destination dir against the packages= array in the PKGBUILD
  2. Re-generate .SRCINFO (makepkg --printsrcinfo) to fix a stale srcinfo cache
  3. Rebuild with --rebuild after cleaning the package directory
  4. Report/fix the PKGBUILD if its package() silently omits a declared sub-package
Defensive patterns

Strategy: validation

Validate before calling

// sanity-check that built artifacts cover the packages= array
let built: Vec<String> = std::fs::read_dir(pkgdest)?
    .filter_map(|e| e.ok().map(|e| e.file_name().to_string_lossy().into_owned()))
    .filter(|n| n.ends_with(".pkg.tar.zst"))
    .collect();
for p in declared_packages(&srcinfo) {
    if !built.iter().any(|b| b.starts_with(&format!("{p}-"))) {
        eprintln!("{p} was not built; PKGBUILD/srcinfo mismatch");
    }
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12). Data as JSON: /api/errors/9d9e7047d030b314. Report an issue: GitHub.

Appendix: source

Thrown at src/install.rs:584

            exec::makepkg(config, dir, &args)?
                .success()
                .with_context(|| tr!("failed to download sources for '{}'", base))?;

            // pkgver bump
            let mut args = vec!["-ofA"];
            if !config.keep_src {
                args.push("-C");
            }
            exec::makepkg(config, dir, &args)?
                .success()
                .with_context(|| tr!("failed to build '{}'", base))?;
        }

        printtr!("{}: parsing pkg list...", base);
        let (pkgdests, version) = parse_package_list(config, dir, pkgdest)?;

        if !base.packages().all(|p| pkgdests.contains_key(p)) {
            bail!(tr!("package list does not match srcinfo"));
        }

        let needs_build = needs_build(config, base, &pkgdests, &version);
        if needs_build {
            // actual build
            if config.chroot {
                let mut extra = Vec::new();
                if config.repos == LocalRepos::None {
                    extra.extend(self.built.iter().map(|s| s.as_str()));
                }
                self.chroot
                    .build(
                        dir,
                        &extra,
                        &config.chroot_flags,
                        &["-feA", "--noconfirm", "--noprepare", "--holdver"],
                        &env,
                    )

View on GitHub (pinned to 9ac3578807)