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, usingDEB_BUILD_ARCHfrom 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, usingDEB_HOST_ARCHfrom 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 fordebarch_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 indebarch_is_illegal()anddebarch_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
- arch rolling: dpkg 1.23.11-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms