From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 06 09:26:18 2019 Received: (at 36876) by debbugs.gnu.org; 6 Aug 2019 13:26:18 +0000 Received: from localhost ([127.0.0.1]:36590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huzTm-0000S8-4r for submit@debbugs.gnu.org; Tue, 06 Aug 2019 09:26:18 -0400 Received: from mx.sdf.org ([205.166.94.20]:55698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1huzTh-0000Rx-Ab for 36876@debbugs.gnu.org; Tue, 06 Aug 2019 09:26:16 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x76DQB51000229 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Tue, 6 Aug 2019 13:26:12 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: Jesse Gibbons Subject: Re: bug#36876: guix system delete-generations removes custom boot menu entries References: <20190731094857.28829b11@gmail.com> <8736ifzjfe.fsf@sdf.lonestar.org> Date: Tue, 06 Aug 2019 09:22:59 -0400 In-Reply-To: (Jesse Gibbons's message of "Mon, 05 Aug 2019 21:12:42 -0600") Message-ID: <87y306xwb0.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36876 Cc: 36876@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jesse Gibbons writes: > Alternatively, we could save in the store a derivation for the the grub > config generated from the bootloader of the configuration. When the > user calls "guix system delete-generations", the derivation can be run, > and the remaining system generations (if any) can be appended in a menu > like when the user calls "guix system reconfigure". (Although it does > not work for me right now, I'm assuming "guix system delete-generations=20 > 2m" as described in the manual will be implemented in the future.) > > The immediate downsides I see to my solution: > > - It would take space in the store per generation, which can add up if > the user does not often call "guix system delete-generations" and calls > "guix system reconfigure" on a healthy basis. The user could just be > reminded to call "guix system delete-generations" occasionally, and any > official service that automatically updates the system via "guix > system reconfigure" can (and considering how large a generation with a > lot of updated system packages can get, probably should) also be > configured to call "guix system delete-generations". > > - If someone hand-edits the grub config the changes would be lost. This > is the case as it is right now, and grub options can be edited in the > configuration, so I'm not too concerned about this. > > -It would be much simpler to identify menu entries generated by guix > that are no longer in the store and remove them, and remove all empty > submenus. Parsing would make hand-editing grub.cfg more dangerous than > a solution that simply scraps the hand-made changes and rebuilds as I > propose, because the user doing the hand-editing would not necessarily > be aware what patterns the parser checks. It would also be > inconsitent: edits to grub.cfg being scrapped when "guix system > reconfigure" is called, but not when 'guix system delete-generations" > is called looks to me like a good way to introduce a bug to the more > adventurous "Murphy's Law"-type users down the road. I haven't tried it yet, but 'menuentry' seems as though it would be a fairly simple structure to parse. > These are just my thoughts. I would love to hear other downsides to my > solution. I prefer your suggestion to mine and think that the benefits may outweigh the costs in this case. This seems to fit into the Guix idea of purity a bit better than parsing a grub.cfg that may have been overwritten by another system. Regards, Jakob --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1JfzMACgkQ9Qb9Fp2P 2VrANQ//bnil91UBb5UGNEs2l/MPS2pLXGnnGuTbfFFBsvFDkL3YCnzLnAce1uRV /rYdU1zGu1HHM3dpN0AGuR5xXX9NKlCZTZcWKFGUBkaS0Tc7r3n7AKFbhTbal2M+ ViGAot6yWuSlghLN2xaBzFR+wqPtghOVAPR5GOZoW6XUpnMSiBtRNRlitR6rettG xm9clTCOkR8f2Cbrgwn/zq9TjXFlcQWhzDB8GSkFgzB+cgJhiuCXsNvYdXhCzNa0 CNxZRS1rxIaSMztWnicTHghN29AxzYNqJ22p3jk6X3WevNoxC4Yr/vIk5BHY1KLJ hl63bj4xTtrN9+8vpgE2UoLIGXGquxyLq5KIi08hu8aXa/C11QnPPiNZlirnghl2 EN7V8Psf2qvZYeXKC0+VbUuiZdHCllERA6+PabI+s6v+IwGWlRjQi/7Yk+e55DOW Y0leADS8HILIK3cMRvIxf/6WGktD/3zxsHMEy7nSePXqyyozfbPhbmAViOTDvh4f Mp4mjAbOER8RbkAXCP8CMlcvBYAWFxyBNflufCuHYEORe0ByY+zhDn3gzqPkuIoO 8f0W2aq/b4nCPIBMojgkVtR8ST88XTiNLVBA7cbAFbwBSRZASGWvyHliAu5F2goS XqyRydKPtnTagkkmRadokAEC5AniJKQ3lV5FQp+X7CPr26ToZzI= =vlA6 -----END PGP SIGNATURE----- --=-=-=--