Your message dated Wed, 27 Jul 2022 20:14:46 +0200 with message-id <[email protected]> and subject line Re: python-debian: please add an implementation for Debian architecture wildcard matching has caused the Debian Bug report #771058, regarding python-debian: please add an implementation for Debian architecture wildcard matching to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 771058: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771058 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: python-debian Version: 0.1.25 Severity: wishlist Tags: patch Hi, finding out whether a given Debian architecture name matches a wildcard is hard and not trivial. Even apt does it wrongly (#748936). It would be great if python-apt would offer a functionality that would offer correct architecture wildcard parsing using /usr/share/dpkg/triplettable There exists a python implementation for architecture wildcard matching in dak at daklib/architecture.py but when I tried it, it would raise a InvalidArchitecture exception for some wildcards. Thus, I wrote my own implementation which was very close to the libdpkg-perl implementation. I wrote a testsuite which tests all possible architecture wildcards (all combinations of known os and cpu values) against all known Debian architectures (dpkg-architecture -L), resulting in 146328 testcases. When I found that my implementation worked fine, I continued to borrow code from the dak implementation to make it more pythonic. The result is a solution which is very close to the dak implementation but has the following differences: - it does not raise an exception when an "invalid" architecture wildcard is encountered but instead returns "no match". I find this the more reasonable approach because the function is supposed to find out whether a wildcard matches and not whether a wildcard is "valid". If needed, then this can be done by another function. - it is more conservative in the sense that: - it does not parse architecture names using the architecture wildcard function just as libdpkg-perl does it - it only checks the debtriplet for the '<cpu>' string just as libdpkg-perl does it - it only replaces the '<cpu>' string in the first two columns just as libdpkg-perl does it You can find my implementation alongside the dak implementation in the following git repository: https://github.com/josch/debarchwildcardtest A Python implementation of architecture wildcard matching is currently needed by: - dak - qa.debian.org/dose - botch To minimize the amount of duplicated implementation it would make sense to have python-debian implement this. Please feel free to add what you think is best from above git repository to python-debian. Thanks! cheers, josch
--- End Message ---
--- Begin Message ---Source: python-debian Source-Version: 0.1.45 Fixed in 0.1.45 (but was missing from the changelog).
--- End Message ---
-- https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint
