pungi is really two more-or-less separate projects sharing a git repo: pungi and pungi_koji.
They don't share a whole lot in common; they have separate implementations of virtually everything. pungi uses the huge pungi/gather.py file. pungi_koji uses the phases in pungi/phases.
pungi/gather.py
pungi/phases
AFAIK, the old non-Koji pungi is not used for anything any more. So...should we just get rid of it?
This would make the codebase smaller and remove a source of constant confusion - folks who don't know or remember about this will very easily run across probably-irrelevant stuff from the non-Koji-pungi path when trying to figure out what pungi does, or write a patch. Removing it would make things clearer.
I ran into this myself today trying to remember/work out how netinst and DVD ISOs are built by pungi. At first I spent several minutes poking through doBuildInstall and doCreateIsos in gather.py before working out/remembering that they're irrelevant to how we actually use Pungi now.
doBuildInstall
doCreateIsos
gather.py
Yeah, most of the file can be deleted. The only part that is still somewhat relevant is the yum-based depsolver. It's not packaged in Fedora, but it does still have some users internally at Red Hat.
But even then, the code for buildinstall and isos and repos in that file is completely unused.
Sorry, which parts specifically is that? How is it being used? Is there some internal usage that just imports the relevant classes from gather.py , or is this using one of the other scripts in pungi itself?
oh, hmm, I guess one path is the yum path of pungi/wrappers/pungi.py , which is used by phases/gather/methods/method_deps.py if using yum not dnf?
so I'm working on a PR which reduces legacy scripts/pungi.py to only doing the gather phase (as seems to be needed by that yum path), and throws out anything else that was only needed by the removed bits of pungi.py. Yell if that's wrong.
https://pagure.io/pungi/pull-request/1793
Good news! I check with the relevant team, and they have migrated all of their composes to DNF backend. We can fully drop the old gather.py module. CC @hlin
OOOH! That's exciting. I'll update this later.
Could we also maybe tweak the dnf gather to be inline instead of a separate script? I get the feeling it was only implemented as a script to be 'API compatible' with the yum one. Or does anything actually need it to be a separate directly-callable script?
I got excited and started deleting in #1795.
The DNF code could run in-process, though sometimes it's helpful when something needs debugging, as the separate script can run even without mounted NFS. It can access the input repos over HTTP.
then maybe we can rewrite it to work both ways, without worrying about compatibility with the old args and stuff and not necessarily making it packageable as a real /usr/bin executable, and run it inline in normal use? dunno if it's worth the effort, though.
This is fixed in https://pagure.io/pungi/pull-request/1795 . Yay!
Metadata Update from @adamwill: - Issue close_status updated to: Fixed - Issue status updated to: Closed (was: Open)
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/pungi/pungi/issues/1792
Please continue any further discussion there.