info > Dpkg::Arch

πŸ“› NAME

NAME Dpkg::Arch - handle architectures

πŸš€ Quick Reference

Use CaseCommandDescription
πŸ”¨ Get build architecture$arch = get_build_arch()Debian build arch, environment‑aware
πŸ“‹ List all valid arches@arches = get_valid_arches()All known Debian architectures
πŸ”€ GNU triplet β†’ multiarch$multiarch = gnutriplet_to_multiarch('i386-linux-gnu')Map GNU triplet to Debian multiarch
πŸ”€ Debian arch β†’ GNU triplet$gnutriplet = debarch_to_gnutriplet('amd64')Map Debian arch to GNU triplet
🧩 Match arch wildcarddebarch_is($arch, 'linux-any')Return true if $arch matches wildcard
πŸ“œ Parse restriction list@arches = debarch_list_parse('linux-any')Split architecture restriction string

πŸ“– DESCRIPTION

The Dpkg::Arch module provides functions to handle Debian architectures, wildcards, and mapping from and to GNU triplets.

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.

βš™οΈ FUNCTIONS

🧱 $arch = get_raw_build_arch()

Get the raw build Debian architecture, without taking into account variables from the environment.

🧱 $arch = get_build_arch()

Get the build Debian architecture, using DEB_BUILD_ARCH from the environment if available.

🧱 $arch = get_raw_host_arch()

Get the raw host Debian architecture, without taking into account variables from the environment.

🧱 $arch = get_host_arch()

Get the host Debian architecture, using DEB_HOST_ARCH from the environment if available.

πŸ“‹ @arch_list = get_valid_arches()

Get an array with all currently known Debian architectures.

πŸ”€ $multiarch = gnutriplet_to_multiarch($gnutriplet)

Map a GNU triplet into a Debian multiarch triplet.

πŸ”€ $multiarch = debarch_to_multiarch($arch)

Map a Debian architecture into a Debian multiarch triplet.

πŸ”€ $gnutriplet = debarch_to_gnutriplet($arch)

Map a Debian architecture into a GNU triplet.

πŸ”€ $arch = gnutriplet_to_debarch($gnutriplet)

Map a GNU triplet into a Debian architecture.

βš–οΈ $bool = debarch_eq($arch_a, $arch_b)

Evaluate the equality of a Debian architecture, by comparing with another Debian architecture. No wildcard matching is performed.

πŸ” $bool = debarch_is($arch, $arch_wildcard)

Evaluate the identity of a Debian architecture, by matching with an architecture wildcard.

πŸƒ $bool = debarch_is_wildcard($arch)

Evaluate whether a Debian architecture is an architecture wildcard.

🚫 $bool = debarch_is_illegal($arch, %options)

Validate an architecture name.

If the "positive" option is set to a true value, only positive architectures will be accepted, otherwise negated architectures are allowed.

🎯 $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.

πŸ“œ @array = debarch_list_parse($arch_list, %options)

Parse an architecture list.

If the "positive" option is set to a true value, only positive architectures will be accepted, otherwise negated architectures are allowed.

πŸ“œ CHANGES

πŸ“Œ 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).

Dpkg::Arch
πŸ“› NAME πŸš€ Quick Reference πŸ“– DESCRIPTION βš™οΈ FUNCTIONS
🧱 $arch = get_raw_build_arch() 🧱 $arch = get_build_arch() 🧱 $arch = get_raw_host_arch() 🧱 $arch = get_host_arch() πŸ“‹ @arch_list = get_valid_arches() πŸ”€ $multiarch = gnutriplet_to_multiarch($gnutriplet) πŸ”€ $multiarch = debarch_to_multiarch($arch) πŸ”€ $gnutriplet = debarch_to_gnutriplet($arch) πŸ”€ $arch = gnutriplet_to_debarch($gnutriplet) βš–οΈ $bool = debarch_eq($arch_a, $arch_b) πŸ” $bool = debarch_is($arch, $arch_wildcard) πŸƒ $bool = debarch_is_wildcard($arch) 🚫 $bool = debarch_is_illegal($arch, %options) 🎯 $bool = debarch_is_concerned($arch, @arches) πŸ“œ @array = debarch_list_parse($arch_list, %options)
πŸ“œ CHANGES
πŸ“Œ Version 1.03 (dpkg 1.19.1) πŸ“Œ Version 1.02 (dpkg 1.18.19) πŸ“Œ Version 1.01 (dpkg 1.18.5) πŸ“Œ Version 1.00 (dpkg 1.18.2)
πŸ“š SEE ALSO

Generated by phpman v4.9.25-3-gdbaf087 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-06 23:12 @216.73.217.93
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^