sync fails under certain conditions due to python3-apt not being installed
A katello user here: https://projects.theforeman.org/issues/31701 reported this. When syncing a deb repo (unsure which one), it errors with:
/usr/lib/python3.6/site-packages/debian/deb822.py:727 UserWarning: Parsing of Deb822 data with python3-apt's apt_pkg was requested but this package is not importable. Is python3-apt installed?
Looking at the code, the default value for use_apt_pkg is True: https://salsa.debian.org/python-debian-team/python-debian/-/blob/master/lib/debian/deb822.py#L2331
and pulp isn't overriding it: https://github.com/pulp/pulp_deb/blob/ff7bf434b0c3aabdf165f2f9793f4acce668c724/pulp_deb/app/tasks/synchronizing.py#L546
so its defaulting to True.
A full traceback isn't available, nor what repository they were syncing, but we could ask for that info if needed.
I have noticed this warning in the past, I just never noticed any actual failures or adverse effects resulting from it.
Looking at the original Katello bug report I am not 100% sure what exactly failed, and if it is really related to the warning.
That being said I should probably stop kicking that particular can down the road and investigate.
With respect to the warning I guess there are two possibilities:
- Stop requesting "parsing of Deb822 data with python3-apt's apt_pkg"
- Simply add
python3-aptto the pulp_deb dependencies.
I have no idea which is better or if this will solve the issue. Perhaps we can ask the user with the problem to retest the sync after manually installing the
python3-apt package? (Though I am also not sure if this package is available on RPM based setups...)
Please register to edit this issue