Public bug reported:

The package is not aware of architecture variants, which causes
tracebacks when a variant appears in a list of architectures, reproducer
follows. The expected behavior is the same of the dpkg perl functions,
e.g. architecture_is_concerned() in the reproducer should behave like
debarch_is_concerned() documented in Dpkg::Arch(3perl).

--- reproducer ---

In [2]: dpkg_arch_table =
debian.debian_support.DpkgArchTable.load_arch_table()

In [3]: dpkg_arch_table.architecture_is_concerned("arm64", ["amd64", "amd64v3", 
"arm64"])
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[3], line 1
----> 1 dpkg_arch_table.architecture_is_concerned("arm64", ["amd64", "amd64v3", 
"arm64"])

File /usr/lib/python3/dist-packages/debian/_arch_table.py:349, in 
DpkgArchTable.architecture_is_concerned(self, architecture, 
architecture_restrictions, allow_mixing_positive_and_negative)
    346     verdict_if_matched = False
    347     arch_restriction_positive = arch_restriction[1:]
--> 349 dpkg_wildcard = self._dpkg_wildcard_to_tuple(arch_restriction_positive)
    351 # Inlined version of self.matches_architecture to reduce the number of 
lookups
    352 if dpkg_arch in dpkg_wildcard:

File /usr/lib/python3/dist-packages/debian/_arch_table.py:143, in 
DpkgArchTable._dpkg_wildcard_to_tuple(self, arch)
    141     result = QuadTupleDpkgArchitecture(*arch_tuple)
    142 else:
--> 143     result = self._dpkg_arch_to_tuple(arch)
    144 self._wildcard_cache[arch] = result
    145 return result

File /usr/lib/python3/dist-packages/debian/_arch_table.py:152, in 
DpkgArchTable._dpkg_arch_to_tuple(self, dpkg_arch)
    149 if dpkg_arch.startswith("linux-"):
    150     dpkg_arch = dpkg_arch[6:]
--> 152 return self._arch2table[dpkg_arch]

KeyError: 'amd64v3'

** Affects: python-debian (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2155911

Title:
  python-debian is not aware of arschitecture variants

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-debian/+bug/2155911/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to