From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 6F15B2AFE; Mon, 13 Jul 2026 11:12:01 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 3372A2AE1; Mon, 13 Jul 2026 11:11:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) by atuin.qyliss.net (Postfix) with ESMTPS id CC5792ADE for ; Mon, 13 Jul 2026 11:11:53 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 01A091400103; Mon, 13 Jul 2026 07:11:52 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 13 Jul 2026 07:11:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1783941111; x=1784027511; bh=sqqmHzyAVs /yuDJVNiaNt7DTeZWVJn/S3Uz7LH3s57E=; b=K/4HJltWTgUpDolU5jlvGC3uM+ 5IXfMMfWWneX/Zc81cshc6uebdLFAAdNsAvCy3IgNcHaWRl+4pWLiM/ayO7+W65D 5l4UzzCMOxnPM9TPRVs0V4ETNV55HrBsmrWy6hWDq2bT01it1v/YkYCkugYzRUlW tskybFBkwNMS4+fvLMDBM2x4CiIyvNMvMyiVaG3M2NmmwVcofqjtEUQVnx4QVsYl N+WZ26RAqlvJJR0fNIdwLay4VPfNzSQ5uxAO2iZcv8iAwv7gxoBGXsTyDBgY37pJ p8V2vKG2cQQN/66watxzDnAjA9w35bpdu7+EDCBHmzOeWmnQM4C2H6/ehpkQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1783941111; x=1784027511; bh=sqqmHzyAVs/yuDJVNiaNt7DTeZWVJn/S3Uz 7LH3s57E=; b=KH532PfHY78hPAn9uHySn2al3GLwatOlGyeGnuraz58YufZVbf6 nWaweVASJ87W6lPqWWU+Uu/Ud1O8bc5ww093bO2E3gELPwLTlKU2imMpurZi57+4 D9f5Dp5fCnlQrr5yGTEtbLnHx2mgEQDBPXc2QTkqNsozLdDE1FPxxCBsyRUyZEAG um940aGXVwJFfLUHH04IR0TdmlUSfFPCzN2ROdOqMR1aOBeW9tm3j9IGEcpajamB JLmH/4POEYYlQ5BG69J5ZY6SDqyxnGLhZuAAXeLPLX6xAxCI9Glhd20vKfgHY++U cOxhsf9y8Ryp2Ub3328vm7tDkStlbI+hMhQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEOeN2OCel5WwWPAmNIKyye6MKNtpuQ0QGZXaQDDh24ahfXyiz8O8VS7/AyBuniZO gcQUY4BzbbYBz8XqDWutZX9ofRwkcu1mIiOMw11roJ5jAL9bTllPCv/UxFV4hHgCT3tbgP rAluzsVDCDM44Demd/VfNcNZDp0tw+CrkIkSzTzc+gyz1dDKEcBLYcdBV6zED9lFBjEEEu FrLr+fzfSQVzgXCUWYbRzAJ6XPM6w1klcHbC7EGlAZUXSAaH+JtGleubHJ/U3v3hE2eLhd GKgNE6ZgqFDboKRux7Q4jQ7YyyJoLidy46bN1jVnbv/ybdQARkZgqYcNo/X+SzwAThwLQf pgekj28ieuGPcTzKhIcihv8tXs9ltphADXY1saGZ+YljQzkdmW71hwkcG5rnsIAG76G6vV iDL/6VF76IO14+aWy8ltRhhm8tDDM0FsWnWdIVhmHJpP9ASBCFdUKcGgwORGuObLCP89Da z2zSfrfsvMboXkHVNHBrbZXfmlcCEV1M7tXp4dmCky30Jni2R+TwA1BF/9u2/QM+BFsDTL hrV9wyKkc0y/XHlvccJYtKw3EPrAOxVB50xKAhNrlfIzsTizlwVXBqvO3akYIHYBBX9aoX frnHIwQA7DRcTEvxXkW8zaFp5GvNK45cXZ82WvcbVK8bVbGYU++7m6mgf9mA X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Jul 2026 07:11:51 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id A2578890F480; Mon, 13 Jul 2026 11:02:52 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: Duplicated VM start and shutdown code In-Reply-To: References: <87qzlb9cz4.fsf@alyssa.is> Date: Mon, 13 Jul 2026 11:02:51 +0200 Message-ID: <87h5m31cuc.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: I65IZRMPIR5AUMHLLVQCFQQF6XIA2TOQ X-Message-ID-Hash: I65IZRMPIR5AUMHLLVQCFQQF6XIA2TOQ X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.10 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 7/10/26 09:43, Alyssa Ross wrote: >> Demi Marie Obenour writes: >>=20 >>> 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? >>=20 >> Yes, it probably should. But it is sort of intentional =E2=80=94 someti= mes 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. Right, but my point is that doesn't *ncessarily* mean that those individual things would make sense as their own reusable components. It might do, but it's not inferrable just from the duplication. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCalSpvAAKCRBbRZGEIw/w ojw3AP9GOTiuE6+A7JhoHZ3IhkxI0et4LAqZV9Vk0/QDe8ImgwEAoNnSuV+NZWO4 gUZjAv3do9g46ZV3zVWzYr4L3vLrNQo= =7bdh -----END PGP SIGNATURE----- --=-=-=--