* fedora 41 uses dnf5 and is no longer compatible with _dnf
@ 2024-07-29 20:55 Han Boetes
2024-07-29 23:53 ` Eric Cook
0 siblings, 1 reply; 2+ messages in thread
From: Han Boetes @ 2024-07-29 20:55 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fedora 41 uses dnf5 and is no longer compatible with _dnf
2024-07-29 20:55 fedora 41 uses dnf5 and is no longer compatible with _dnf Han Boetes
@ 2024-07-29 23:53 ` Eric Cook
0 siblings, 0 replies; 2+ messages in thread
From: Eric Cook @ 2024-07-29 23:53 UTC (permalink / raw)
To: zsh-workers
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-29 23:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-29 20:55 fedora 41 uses dnf5 and is no longer compatible with _dnf Han Boetes
2024-07-29 23:53 ` Eric Cook
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).