2

Today I noticed some extra words when TAB completing dnf search.

Anyone has any idea what is causing this behaviour? Tried to dnf clean all and then reinstall bash_completion and dnf update. It didn't work. I have added some aliases and custom bash prompt (PS1) to .bashrc, rest is default.

#dnf searc
a              DNF            is             Please         the
and            documentation  not            'plugins'      The
API            function       of             release.       upcoming
at             functions.     officially     removed        use
available      api.html.      only           search         will
be             in             part           supported
2
  • THis looks like a bug in bash completion in dnf (not the first one and not the last one). Let's see what I can find out.
    – Jakuje
    May 25, 2016 at 21:45
  • Edited my answer. This is already fixed upstream so only thing needed is to wait for distribution to update.
    – Jakuje
    May 26, 2016 at 7:38

1 Answer 1

3

This is a bug in bash completion in dnf (not the first one and not the last one). Let's see what I can find out.

Running the same with set -x will reveal the source of this:

 python3 -c 'import sys; from dnf.cli import completion_helper as ch; ch.main(sys.argv[1:])' _cmds sear -d 0 -q -C

does not return the list of options, but basically some error. It is because the /usr/lib/python3.4/site-packages/dnf/cli/completion_helper.py is using not-supported API and when debugging, we see errors like this:

The 'plugins' function is not a part of DNF API and will be removed in the upcoming DNF release. Please use only officially supported API functions. DNF API documentation is available at https://dnf.readthedocs.org/en/latest/api.html.

from line

172             base.plugins.load(base.conf.pluginpath, [])

This should be base.init_plugins() and it was already fixed in the recent commit. Only thing needed now is to wait until it get fixed in distribution.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .