Dpkg::Arch(3perl)

hey bestie πŸ’– welcome to Dpkg::Arch(3perl) from libdpkg-perl β€” the module that handles Debian architectures, wildcards, and mapping from and to GNU triplets. No cap, it's giving arch-brain energy. πŸŽ€

✨ NAME ✨

Dpkg::Arch β€” handle architectures πŸ¦‹

🌸 DESCRIPTION 🌸

The Dpkg::Arch module provides functions to handle Debian architectures, wildcards, and mapping from and to GNU triplets. Literally the whole vibe. ✨

No symbols are exported by default. The :all tag can be used to import all symbols. The :getters, :parsers, :mappers and :operators tags can be used to import specific symbol subsets. Pick your little import squad πŸ’…


πŸ’… FUNCTIONS πŸ’…

  • $arch = get_raw_build_arch() β€” grab the raw build Debian architecture, without taking into account variables from the environment. Pure and unfiltered 🫢
  • $arch = get_build_arch() β€” get the build Debian architecture, using DEB_BUILD_ARCH from the environment if available. Environment said hello, so it listened πŸ’–
  • $arch = get_raw_host_arch() β€” get the raw host Debian architecture, without taking into account variables from the environment. Again: no environment peer pressure 🌸
  • $arch = get_host_arch() β€” get the host Debian architecture, using DEB_HOST_ARCH from the environment if available. If the env var is there, it's invited to the group chat ✨
  • @arch_list = get_valid_arches() β€” get an array with all currently known Debian architectures. The whole iconic roster πŸ‘‘
  • $multiarch = gnutriplet_to_multiarch($gnutriplet) β€” map a GNU triplet into a Debian multiarch triplet. Glow-up translation πŸ¦‹
  • $multiarch = debarch_to_multiarch($arch) β€” map a Debian architecture into a Debian multiarch triplet. Same family, different fit πŸ’…
  • $gnutriplet = debarch_to_gnutriplet($arch) β€” map a Debian architecture into a GNU triplet. Crossing over ✨
  • $arch = gnutriplet_to_debarch($gnutriplet) β€” map a GNU triplet into a Debian architecture. Crossover part two, electric boogaloo 🌈
  • $bool = debarch_eq($arch_a, $arch_b) β€” evaluate the equality of a Debian architecture by comparing it with another Debian architecture. No wildcard matching is performed. Straight-up comparison, periodt πŸ’€
  • $bool = debarch_is($arch, $arch_wildcard) β€” evaluate the identity of a Debian architecture by matching it with an architecture wildcard. Wildcard matchup check πŸ’–
  • $bool = debarch_is_wildcard($arch) β€” evaluate whether a Debian architecture is an architecture wildcard. Is it wildcard-coded? Let's check πŸŽ€
  • $bool = debarch_is_invalid($arch, %opts) β€” validate an architecture name. You get a bool back, bestie.

Options:

  • positive β€” if set to a true value, only positive architectures will be accepted, otherwise negated architectures are allowed. Set the vibe accordingly πŸ’…
  • $bool = debarch_is_illegal($arch, %opts) β€” this is a deprecated alias for debarch_is_invalid. It's giving old-era energy, so use the new one 🫢
  • $bool = debarch_is_concerned($arch, @arches) β€” evaluate whether a Debian architecture applies to the list of architecture restrictions, as usually found in dependencies inside square brackets. Square-bracket dependency lore πŸ”₯
  • @array = debarch_list_parse($arch_list, %opts) β€” parse an architecture list. Very list, very arch, very demure ✨

Options:

  • positive β€” if set to a true value, only positive architectures will be accepted, otherwise negated architectures are allowed. Same option, same rules, no cap πŸ’–

πŸ¦‹ CHANGES πŸ¦‹

πŸŽ€ Version 1.04 (dpkg 1.23.0)

  • New functions: debarch_is_invalid().
  • Deprecated functions: debarch_is_illegal().

πŸŽ€ Version 1.03 (dpkg 1.19.1)

  • New argument: Accept a "positive" option in debarch_is_illegal() and debarch_list_parse().

πŸŽ€ Version 1.02 (dpkg 1.18.19)

  • New import tags: :all, :getters, :parsers, :mappers, :operators.

πŸŽ€ Version 1.01 (dpkg 1.18.5)

  • New functions: debarch_is_illegal(), debarch_list_parse().

πŸŽ€ Version 1.00 (dpkg 1.18.2)

  • Mark the module as public.

πŸ‘€ SEE ALSO πŸ‘€

dpkg-architecture(1) β€” go say hi πŸ’œ


okay bye bestie β€” this Dpkg::Arch(3perl) page from libdpkg-perl is version 1.23.11-dirty, dated 2026-09-09. Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from