Bug 2014636
| Summary: | Importing debian_support gives error | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ian <saturns_rings> |
| Component: | python-apt | Assignee: | Neal Gompa <ngompa13> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 35 | CC: | fedoraproject.org, lankyleggy, msuchy, ngompa13 |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | python-apt-2.3.0-1.fc34 python-apt-2.3.0-1.fc35 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-01-31 01:11:47 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This actually comes from
import apt_pkg
apt_pkg.init()
so switching components.
The reproducer should be:
$ python3
import apt_pkg
apt_pkg.init()
But one question anyway:
> sudo dnf install -y python-debian
There is no python-debian. I assume typo and "python3-debian"
And BTW on my workstation, I cannot reproduce this error. It works without problem. Thanks for correcting and refining the reproducer. I just tried it on fresh F35 beta and still get it, I've included more output below if it helps: $ sudo dnf install python3-debian ... Dependencies resolved. ============================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================== Installing: python3-debian noarch 0.1.36-8.fc35 fedora 107 k Installing dependencies: apt-libs x86_64 2.3.8-1.fc35 fedora 1.2 M python3-chardet noarch 4.0.0-4.fc35 fedora 219 k Installing weak dependencies: python3-apt x86_64 2.2.0-2.fc35 fedora ... $ python3 Python 3.10.0rc1 (default, Aug 3 2021, 00:00:00) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import apt_pkg >>> apt_pkg.init() Traceback (most recent call last): File "<stdin>", 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 >>> Both errors ("Directory exist" and "Unable to determin") actually comes from ./apt-pkg/init.cc from apt-libs. But from this point I am really lost and I leave it to someone else who knows the apt code or can reproduce it.
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 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. |
Description of problem: Trying to use the debian_support python module this package provides gives an error (see repro below). If you uninstall this package and instead install python-debian via pip it works ok. Version-Release number of selected component (if applicable): 0.1.36 How reproducible: 100% on F33/4/5. Steps to Reproduce: $ sudo dnf install -y python-debian $ echo "import debian.debian_support" | python Actual results: ``` File "/usr/lib/python3.9/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 ``` Expected results: No error. Additional info: As I say if you uninstall via dnf then reinstall from pip python-debian works ok: $ sudo dnf remove python-debian $ pip install python-debian $ echo "import debian.debian_support" | python Gives no error.