From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: guix describe -p and Guix commit? Date: Sat, 28 Sep 2019 23:08:57 +0200 Message-ID: <87o8z4m8ly.fsf@gnu.org> References: <87v9tim84a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57040) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEJxl-0007jk-TM for guix-devel@gnu.org; Sat, 28 Sep 2019 17:09:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEJxi-0003pP-MC for guix-devel@gnu.org; Sat, 28 Sep 2019 17:09:08 -0400 Received: from [2a0c:e300::1] (port=33714 helo=hera.aquilenet.fr) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iEJxg-0003kO-Ls for guix-devel@gnu.org; Sat, 28 Sep 2019 17:09:06 -0400 In-Reply-To: (zimoun's message of "Tue, 24 Sep 2019 18:00:24 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: zimoun Cc: Guix Devel Hello! zimoun skribis: > On Tue, 24 Sep 2019 at 10:06, Ludovic Court=C3=A8s wrote: > >> zimoun skribis: >> >> > How to track from which channel and commit the packages in a profile c= ome from? >> >> Pro tip: open the =E2=80=98manifest=E2=80=99 file of the profile, and se= arch for >> =E2=80=9Cprovenance=E2=80=9D. You=E2=80=99ll see things like: > > Oups! I scrolled this file but I missed the feature. > It is what I have looking for. :-) > > >> It=E2=80=99s an undocumented and unused feature, mostly because I wouldn= =E2=80=99t know >> how to expose it at the CLI level. Ideas welcome! > > The easy CLI modification is "guix package --list-installed" to expose > the commit and URI (and branch). > I will give a try. Though =E2=80=98--list-installed=E2=80=99 is really about single lines that= can be piped to =E2=80=98cut=E2=80=99. I=E2=80=99m not sure it=E2=80=99s the right plac= e for what you have in mind. > One step further: the record should be compliant with > the option file '-f' or manifest '-m' of "guix package" (or "guix > pack"). > Say, I created a profile, did some pulls, installed and removed > packaged. Now I would like to easy "reproduce" this messy > computational environment to another machine. Say I copy > '/manifest' to 'my-mess', then if I can run "guix package -p > my-profile -m my-mess" (or "guix pack"), I would be happy. ;-) > Or if some compliance of '/manifest' and the option '-m' is > not possible, perhaps a way to convert this /manifest into a > '-m' manifest. > Maybe, is it already possible? Re-instatiate the tools from a profile. > > What do you think? > Does it make sense? It does! In theory, for every package that has a =E2=80=98provenance=E2=80= =99 property, we could arrange to generate code that refers to an inferior with the appropriate commit and returns a . I suspect it could easily get messy and impractical: the generated code could end up instantiating a whole bunch of inferiors for really no good reason, and instantiating that manifest could be disappointingly slow because of that. It might be easier to generate code that approximates what the profile contains, with a warning when we see that there are several different =E2=80=98provenance=E2=80=99 properties. Ludo=E2=80=99.