{"record":{"id":"7220d612a4effe6e","repo":"denoland/deno","slug":"no-rpm-architecture-mapping-for-arch-other-su","errorCode":null,"errorMessage":"No RPM architecture mapping for arch '{other}'; supported: x86_64, aarch64","messagePattern":"No RPM architecture mapping for arch '(.+?)'; supported: x86_64, aarch64","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":3933,"sourceCode":"  match arch {\n    \"x86_64\" => Ok(\"amd64\"),\n    \"aarch64\" => Ok(\"arm64\"),\n    other => bail!(\n      \"No Debian architecture mapping for arch '{other}'; supported: x86_64, aarch64\"\n    ),\n  }\n}\n\n/// Map a target triple (or the host arch) to an RPM architecture name. RPM\n/// keeps the triple's arch names (`x86_64`, `aarch64`).\nfn rpm_arch_for_target(target: Option<&str>) -> Result<&'static str, AnyError> {\n  let arch = target\n    .and_then(|t| t.split('-').next())\n    .unwrap_or(std::env::consts::ARCH);\n  match arch {\n    \"x86_64\" => Ok(\"x86_64\"),\n    \"aarch64\" => Ok(\"aarch64\"),\n    other => bail!(\n      \"No RPM architecture mapping for arch '{other}'; supported: x86_64, aarch64\"\n    ),\n  }\n}\n\n/// `.desktop` entry installed at `/usr/share/applications/<pkg>.desktop`.\n///\n/// Unlike the in-app-dir `.desktop` (whose `Exec`/`Icon` are relative), this\n/// one points `Exec` at the package name (resolved via PATH from the\n/// `/usr/bin/<pkg>` symlink) and `Icon` at the installed hicolor icon name.\nfn system_desktop_entry(meta: &LinuxPackageMeta) -> String {\n  format!(\n    \"[Desktop Entry]\\n\\\n     Type=Application\\n\\\n     Name={app_name}\\n\\\n     Exec={package}\\n\\\n     Icon={package}\\n\\\n     StartupWMClass={identifier}\\n\\","sourceCodeStart":3915,"sourceCodeEnd":3951,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/desktop.rs#L3915-L3951","documentation":"RPM packaging maps the target triple's arch component to the RPM architecture name; RPM keeps the same names, so only x86_64 and aarch64 are accepted. Any other arch component of --target (or the host arch, when --target is omitted) bails before the package is authored.","triggerScenarios":"Building an .rpm with --target armv7-unknown-linux-gnu (or similar unsupported arch), or running without --target on a non-x86_64/aarch64 host.","commonSituations":"Packaging for ARM/32-bit distributions; CI runners on uncommon architectures relying on the implicit host-arch default.","solutions":["Use `--target x86_64-...` or `--target aarch64-...` when building RPMs.","Set --target explicitly in CI config so RPM arch doesn't silently follow the runner.","Ship a tarball for arches outside the supported pair."],"exampleFix":"# before\ndeno desktop --target armv7-unknown-linux-musleabihf --rpm\n\n# after\ndeno desktop --target aarch64-unknown-linux-gnu --rpm","handlingStrategy":"validation","validationCode":"case \"${TARGET%%-*}\" in\n  x86_64|aarch64) ;;\n  *) echo \"rpm packaging supports x86_64 and aarch64 only\"; exit 1 ;;\nesac","typeGuard":"function isSupportedRpmArch(target: string): boolean {\n  const a = target.split(\"-\")[0];\n  return a === \"x86_64\" || a === \"aarch64\";\n}","tryCatchPattern":null,"preventionTips":["Pass an explicit triple when building RPMs; don't rely on the runner's default arch.","Remember RPM uses the triple's own arch names (no amd64/arm64 rename)."],"tags":["desktop","linux","rpm","architecture","packaging"],"backgroundTag":"unsupported-target-arch","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}