GNU bug report logs - #78661
30.1; pcomplete/dnf does not work with dnf5

Previous Next

Package: emacs;

Reported by: Rahguzar <rahguzar <at> mailbox.org>

Date: Sun, 1 Jun 2025 07:50:06 UTC

Severity: normal

Found in version 30.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rahguzar <rahguzar <at> mailbox.org>
To: Augusto Stoffel <arstoffel <at> gmail.com>
Cc: 78661 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#78661: 30.1; pcomplete/dnf does not work with dnf5
Date: Sun, 22 Jun 2025 13:25:28 +0500
[Message part 1 (text/plain, inline)]
Hi Augusto and Eli,

Augusto Stoffel <arstoffel <at> gmail.com> writes:

> On Sat, 14 Jun 2025 at 16:28, Eli Zaretskii wrote:
>
>> Augusto, any comments or suggestions?
>>
>>> Cc: arstoffel <at> gmail.com
>>> Date: Sun, 01 Jun 2025 12:49:02 +0500
>>> From:  Rahguzar via "Bug reports for GNU Emacs,
>>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>> 
>>> 
>>> Dear Emacs maintainers,
>>> 
>>> Recently released Fedora 42 defaults to dnf 5. This had the effect of
>>> breaking pcomplete completions provided by pcomplete/dnf. I have worked
>>> around the problem in my init file by means of advice.
>>> 
>>> I can send a patch with the changes needed to make completion work with
>>> dnf 5. However, I want to make some additional changes too so I would
>>> like to ask some questions first (I have cced Augusto Stoffel since he
>>> added the code in question):
>>> 
>>> 1) I think "upgrade" should offer completions from installed packages
>>> but currently it offers completions from all packages. Is there a reason?
>
> No, this change makes sense.
>
>>> 2) Currently completions of package names come with a very long version
>>> string which I have never needed and have to delete by hand. Is it ok to
>>> remove that?
>
> I think I used to get that with shell completions so there might be a
> reason it was done that way, but seems reasonable to me to remove the
> versions.
>
>>> 3) The most reliable way of getting package names without version string
>>> is (in my opinion) to use the dnf repoquery command. It also has the
>>> (slight) advantage of not requiring sqlite3. However, although I can get
>>> the list of installed and available packages from it, I can't get the
>>> list of 'not installed' packages. On the other hand the current version
>>> seems to return the same list for 'not installed' and available packages.
>>> Is it ok to just remove the 'not installed' case and use the available
>>> packages instead?
>
> I think this is fine too.

I have attached a patch implementing these changes. It also provides
better support for dnf repoquery --what* commands and adds some aliases
to the list of subcommands for which completion of package names is
provided.

Rahguzar

[0001-lisp-pcmpl-rpm.el-generate-completions-for-dnf5.patch (text/x-patch, attachment)]

This bug report was last modified 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.