From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: fedora 41 uses dnf5 and is no longer compatible with _dnf
Date: Mon, 29 Jul 2024 19:53:08 -0400 [thread overview]
Message-ID: <69a366fc-65ca-44ca-931b-0fd5cf6ba5e8@gmx.com> (raw)
In-Reply-To: <d2f4f939-77d3-484a-aa79-21ade0b9c156@gmail.com>
On 7/29/24 4:55 PM, Han Boetes wrote:
> Hi there,
>
> fedora 40, using dnf3 used this nice db file with a list of all packages: /var/cache/dnf/packages.db
>
> Alas, fedora 41 switched to dnf5 which no longer uses this file so:
>
> % dnf install python3-
> No matches for: `dnf command' or `available package'
>
> The current layout of the cache folder looks like this: % find /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/repodata
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/repodata/repomd.xml
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/repodata/b826501210413564ce176a21fac9732a065d87670422eaa2054ac1bc5ecb06c9-primary.xml.zck
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/repodata/5c3ec73a978ca882d72f61c8484b3915d1690e89dc7a13f5951eb0de96b64940-comps-Everything.x86_64.xml.gz
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/metalink.xml
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/solv
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/solv/rawhide-group.solvx
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/solv/rawhide.solv
> /var/cache/libdnf5/rawhide-2d95c80a1fa0a67d/packages
> I can't help with writing new code for this problem, but I'll gladly help with testing. Cheers, Han
>
>
>
Briefly looked into it and it seems like the two cases that _dnf_query_db() handles can be replaced with dnf calls:
dnf --quiet --cacheonly repoquery --installed --queryformat='%{name}\n'
and
dnf --quiet --cacheonly repoquery --queryformat='%{name}\n'
the latter would get available package names or exit 1 should the cache not exist.
[root@c41423fd368f /]# dnf --quiet --cacheonly repoquery --queryformat='%{name}\n' zsh
Cache-only enabled but no cache for repository "rawhide"
I haven't tested what happens with multiple repos and one repo lacks it's cache though.
prev parent reply other threads:[~2024-07-29 23:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 20:55 Han Boetes
2024-07-29 23:53 ` Eric Cook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69a366fc-65ca-44ca-931b-0fd5cf6ba5e8@gmx.com \
--to=llua@gmx.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).