I would like to be able to use some dnf (or dnf5) commands to query local repositories that I have setup by (e.g.) copying repodata from an install DVD image. I have been trying to use dnf with --repofrompath options to point at my repo-data. However, I want to query the available packages just in that/those repos – and to somehow exclude any info from packages that are already installed.
The use case for this is to query info about packages available on an install DVD that may be a different release (or even different architecture) from the ‘host’ machine I’m using to run dnf. But even though there are these options to limit the repos you are looking at, I see no way to keep dnf from inspecting the already installed packages – and therefore I’m asking if there is a way to do that.
Ultimately I’d like to do this programmatically, via the python dnf module – but at this point, I’d be happy if I can do it with just dnf commands, but I’m not sure it is possible. Anyone know?
It does look like that works as expected from cmdline, thanks! [Note: I just realized, this is working as expected, using dnf5 – but not with plain dnf – I will investigate further ] - Looks like it might take some fiddling with my python/dnf script (currently my ‘available’ list is coming out length 0)
– but I’ll try marching forward there, and fall back to using cmdline if I have to – thanks!
Well, I specifically need to exclude the other-configured repos… and I’m trying to avoid messing with the ‘system’ setup in /etc/yum.repos.d
The cmd suggested above seemed to work – but only with dnf5 (which is fine). I’m currently trying to adapt my python script to use libdnf5 module, instead of dnf module