LINTIAN::DATA::ARCHITECTURES(3)

πŸ¦‹ NAME πŸ¦‹

Lintian::Data::Architectures β€” the Lintian API bestie for handling architectures and wildcards πŸ’…


✨ SYNOPSIS ✨

use Lintian::Data::Architectures;

🌸 DESCRIPTION 🌸

Okay so this is the Lintian API for checking and expanding architectures and architecture wildcards. It's giving "glow-up for arch strings" 🫢

Real talk though: these functions are backed by a data file, so the whole thing may be out of date 😭. If you need it fresh, use private/refresh-archs to update it. Slay.

Generally, all architecture names are in the format "$os-$architecture" and wildcards are "$os-any" or "any-$cpu" β€” though there are exceptions, because of course there are πŸ™ˆ.

Heads up: the architecture and cpu name are not always identical. Example: architecture "armhf" has cpu name "arm". Not me being confused by that for a whole afternoon πŸ’€

πŸ‘‘ INSTANCE METHODS πŸ‘‘

First up, the mysterious ones β€” the original page lists these with zero explanation, main character energy with no backstory, we respect it πŸ™ˆ:

  • title
  • location
  • host_variables
  • "wildcards"
  • "names"

And then the ones that actually do the talking πŸ’–:

🧚 is_wildcard ($wildcard)

Returns a truth value if $wildcard is a known architecture wildcard. ✨

Note: 'any' is considered a wildcard and not an architecture. Periodt.

πŸŽ€ is_release_architecture ($architecture)

Returns a truth value if $architecture is (an alias of) a Debian machine architecture. 🌈

It returns a false value for architecture wildcards (including "any") and for unknown architectures. So don't come at it with nonsense, she will clock it πŸ’…

πŸ’œ expand_wildcard ($wildcard)

Returns a list of architectures that this wildcard expands to. No order is guaranteed β€” and no, not even between calls, so don't get attached to the ordering 😭. Returned values must not be modified. Hands off, bestie.

Note: this list is based on the architectures in Lintian's data file. However, many of these are not supported or used in Debian or any of its derivatives. Lowkey a lot of them are just hanging out.

The returned values match the list generated by dpkg-architecture -L, so the returned list may use (e.g.) "amd64" for "linux-amd64". Iykyk πŸ¦‹

πŸ”₯ wildcard_includes ($wildcard, $architecture)

Returns a truth value if $architecture is included in the list of architectures that $wildcard expands to. 🫢

This is generally faster than

grep { $_ eq $architecture } expand_arch_wildcard ($wildcard)

It also properly handles cases like "linux-amd64" and "amd64" being aliases. Obsessed with a function that just gets it πŸ’–

⭐ More methods, also iconic:

  • valid_restriction
  • restriction_matches
  • load
  • refresh

That's the whole page, no cap 🌸 β€” this was Lintian v2.139.0ubuntu2, dated 2026-10-08. Stay hydrated, read your manpages, and go expand a wildcard or two for me πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from