Description of problem: On aarch64, diffoscope can't compare two RPM files, it tries to import debian.debian_support and failed. I tried to simplify the test case and it turns out `diffoscope --help` also failed the same way. Version-Release number of selected component (if applicable): diffoscope-193-1.fc35.aarch64 How reproducible: Always Steps to Reproduce: 1. dnf install diffoscope (or, on x86_64, mock -r fedora-35-aarch64 --forcearch=aarch64 install diffoscope 2. diffoscope --help Actual results: ❯ diffoscope --help Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/diffoscope/main.py", line 744, in main parsed_args = parser.parse_args(args) File "/usr/lib64/python3.10/argparse.py", line 1825, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib64/python3.10/argparse.py", line 1858, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib64/python3.10/argparse.py", line 2067, in _parse_known_args start_index = consume_optional(start_index) File "/usr/lib64/python3.10/argparse.py", line 2007, in consume_optional take_action(action, args, option_string) File "/usr/lib64/python3.10/argparse.py", line 1935, in take_action action(self, namespace, argument_values, option_string) File "/usr/lib64/python3.10/argparse.py", line 1098, in __call__ parser.print_help() File "/usr/lib64/python3.10/argparse.py", line 2555, in print_help self._print_message(self.format_help(), file) File "/usr/lib64/python3.10/argparse.py", line 2539, in format_help return formatter.format_help() File "/usr/lib/python3.10/site-packages/diffoscope/main.py", line 493, in format_help ComparatorManager().format_descriptions(), File "/usr/lib/python3.10/site-packages/diffoscope/comparators/__init__.py", line 127, in __init__ self.reload() File "/usr/lib/python3.10/site-packages/diffoscope/comparators/__init__.py", line 138, in reload mod = importlib.import_module( File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3.10/site-packages/diffoscope/comparators/debian.py", line 24, in <module> from debian.deb822 import Dsc, Deb822 File "/usr/lib/python3.10/site-packages/debian/deb822.py", line 283, in <module> import debian.debian_support File "/usr/lib/python3.10/site-packages/debian/debian_support.py", line 46, in <module> apt_pkg.init() apt_pkg.Error: W:Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory), E:Unable to determine a suitable pa ckaging system type Expected results: should print out the help. also comparing two RPMs should work, as in https://fedoramagazine.org/use-diffoscope-in-packager-workflows/ Additional info: Tested on a Fedora Linux Workstation 35 VM on a MacBook Pro M1
This is not architecture-specific. The issue occurs when python3-apt is installed, but not dpkg. python-apt is somehow confused: $ python3 -c 'import apt_pkg; apt_pkg.init()' Traceback (most recent call last): File "<string>", line 1, in <module> apt_pkg.Error: W:Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory), E:Unable to determine a suitable packaging system type The first issue is that it reports "DirectoryExists" when it in fact doesn't. This causes the import of debian.deb822 fails: $ python3 -c 'import debian.deb822' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python3.10/site-packages/debian/deb822.py", line 283, in <module> import debian.debian_support File "/usr/lib/python3.10/site-packages/debian/debian_support.py", line 46, in <module> apt_pkg.init() apt_pkg.Error: W:Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such file or directory), E:Unable to determine a suitable packaging system type I think this would be best to resolve the issue either in python-apt or python-debian. The import of the module should not fail with an exception.
FEDORA-2022-5a15b7ab52 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5a15b7ab52
FEDORA-2022-3f6e44d506 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3f6e44d506
Yup, just noticed it failed on x86_64 as well, thanks.
FEDORA-2022-5a15b7ab52 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5a15b7ab52` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5a15b7ab52 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-3f6e44d506 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-3f6e44d506` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-3f6e44d506 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-5a15b7ab52 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-3f6e44d506 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.