From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbCA5-00074x-V1 for guix-patches@gnu.org; Fri, 28 Jul 2017 16:47:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbCA1-0000ic-VV for guix-patches@gnu.org; Fri, 28 Jul 2017 16:47:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57716) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dbCA1-0000iW-Sk for guix-patches@gnu.org; Fri, 28 Jul 2017 16:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dbCA1-0000lr-Md for guix-patches@gnu.org; Fri, 28 Jul 2017 16:47:01 -0400 Subject: [bug#27865] [PATCH 3/3] pull: Use the commit ID as the version string. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 28 Jul 2017 22:45:39 +0200 Message-Id: <20170728204539.21879-3-ludo@gnu.org> In-Reply-To: <20170728204539.21879-1-ludo@gnu.org> References: <20170728204539.21879-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27865@debbugs.gnu.org * guix/scripts/pull.scm (build-from-source): Add #:commit parameter. Pass it to BUILD. (build-and-install): Add #:commit and pass it to 'build-from-source'. (guix-pull): Pass #:commit to 'build-and-install'. --- guix/scripts/pull.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 5f6733cf9..263a727b3 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -134,9 +134,10 @@ Download and deploy the latest version of Guix.\n")) ;; a makefile, and, similarly, is intended to always keep this name. "build-aux/build-self.scm") -(define* (build-from-source source #:key verbose?) +(define* (build-from-source source + #:key verbose? commit) "Return a derivation to build Guix from SOURCE, using the self-build script -contained therein." +contained therein. Use COMMIT as the version string." ;; Running the self-build script makes it easier to update the build ;; procedure: the self-build script of the Guix-to-be-installed contains the ;; right dependencies, build procedure, etc., which the Guix-in-use may not @@ -145,12 +146,13 @@ contained therein." (build (primitive-load script))) ;; BUILD must be a monadic procedure of at least one argument: the source ;; tree. - (build source #:verbose? verbose?))) + (build source #:verbose? verbose? #:version commit))) (define* (build-and-install source config-dir - #:key verbose?) + #:key verbose? commit) "Build the tool from SOURCE, and install it in CONFIG-DIR." (mlet* %store-monad ((source (build-from-source source + #:commit commit #:verbose? verbose?)) (source-dir -> (derivation->output-path source)) (to-do? (what-to-build (list source))) @@ -249,6 +251,7 @@ certificates~%")) (canonical-package guile-2.0))))) (run-with-store store (build-and-install checkout (config-directory) + #:commit commit #:verbose? (assoc-ref opts 'verbose?))))))))))) ;;; pull.scm ends here -- 2.13.3