From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/4] emacs: Add 'guix-devel-download-package-source'. Date: Thu, 08 Oct 2015 13:46:05 +0200 Message-ID: <87twq1twg2.fsf@gnu.org> References: <1443791046-1015-1-git-send-email-alezost@gmail.com> <1443791046-1015-3-git-send-email-alezost@gmail.com> <87d1wvadw2.fsf@gnu.org> <87bnceah2e.fsf@gmail.com> <87r3la6077.fsf@gnu.org> <87eghalc7s.fsf@gmail.com> <87wpv1tils.fsf@gnu.org> <87a8rwf2vl.fsf@gmail.com> <87mvvu6f5y.fsf@gnu.org> <87si5mbnfr.fsf@gmail.com> <87k2qy1gah.fsf@gnu.org> <87d1wpfvmv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zk9eI-0006oG-4x for guix-devel@gnu.org; Thu, 08 Oct 2015 07:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zk9eD-0002UK-T0 for guix-devel@gnu.org; Thu, 08 Oct 2015 07:46:14 -0400 In-Reply-To: <87d1wpfvmv.fsf@gmail.com> (Alex Kost's message of "Thu, 08 Oct 2015 14:27:20 +0300") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > Ludovic Court=C3=A8s (2015-10-08 01:10 +0300) wrote: > > [...] >>>>> for example "" (an empty string). Also I believe people begin to >>>>> write a new package from some template, so you have a working skeleton >>>>> of future package with all required fields from the very beginning. >>>>> Then after filling an origin 'uri', you could "C-c . s" to download >>>>> the source and get its hash. >>>> >>>> Hmm. I=E2=80=99m skeptical. :-) >>> >>> Sorry, I didn't get it. Skeptical that people start from a template? >> >> Yes, it feels weird to me, the idea that an object with bogus >> values would be created just for the sake of satisfying the download >> tool. > > Hm, I have an opposite opinion: for me it is weird to write a package > from scratch. I usually start from a package template that has all > required fields (including ) or even I just copy an existing > package and then modify the fields I need. > > I wonder, do you start to write a package from scratch? Sometimes I write from scratch, sometimes I use =E2=80=98guix import=E2=80= =99, sometimes I copy/paste some other definition. >> Wouldn=E2=80=99t the explanation in the manual of how to use this be rel= atively >> complex? That=E2=80=99s a good benchmark. > > As I see it, it is not complex: > > =C2=ABDownload a source of the package defined by the current variable > definition and print its SHA256 hash. This command has the same meaning > as running @code{guix download} on the package source (@pxref{Invoking > guix download})=C2=BB Hmm OK. (Is it really =E2=80=9Ccurrent variable definition=E2=80=9D, or ra= ther =E2=80=9C=E2=80=98origin=E2=80=99 form at point=E2=80=9D?) > Anyway, after all I'm not going to add this command to not give people > an incentive not to check signatures. Yeah, maybe we can see where the other discussion goes. The command to call =E2=80=98package-source-derivation=E2=80=99 for the pac= kage at point is still welcome, though. :-) >>>> What about, instead, providing an interactive function that would prom= pt >>>> for a URL, run =E2=80=98guix download=E2=80=99 on that, and emit an = =E2=80=98origin=E2=80=99 template at >>>> point with all the info? >>> >>> I see several problems here, but the main is: this sounds like it should >>> be synchronous: you give an URL, wait until the source is downloaded and >>> finally get the template at point. But downloading can take a VERY long >>> time, so I don't think it will be a usable command. >> >> Good point. But there=E2=80=99s the same problem with what you propose = no? The >> user somehow has to wait for the download to complete? > > Well, sure you also need to wait for the download, but your Emacs won't > be freezed for all this time, so you can do something else while it is > being downloaded in the REPL. Right. Thanks, Ludo=E2=80=99.