On 7/10/26 09:43, Alyssa Ross wrote: > Demi Marie Obenour writes: > >> I noticed that vm-import, run-appimage, and run-flatpak all have the >> same code to start a VM, and run-flatpak and run-appimage both have >> the same code to shut down a VM. Is this intentional, or should it >> be replaced with common code? > > Yes, it probably should. But it is sort of intentional — sometimes I'm > not sure exactly which parts should be shared, so I leave code > duplicated for a while with the idea that it'll become more clear what > the common core should be over time. (It usually works out.) Without a > good understanding, it's easy to deduplicate too much, and end up with > something that isn't flexible enough down the line, and then it has to > be un-deduplicated again. Happy for you to try deduplicating it if you > think you have a good idea of where to draw that line, but otherwise > it's also fine for it to stay duplicated for now. The code that creates temporary files and per-VM users is the same for vm-import, run-appimage, and run-flatpak. The code that tears down instances and namespaces is the same for run-appimage and run-flatpak. -- Sincerely, Demi Marie Obenour (she/her/hers)