From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Git fetch method not working right Date: Tue, 08 Apr 2014 13:57:15 +0200 Message-ID: <877g70niec.fsf@gnu.org> References: 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]:51510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXUed-0001s9-Ej for Guix-devel@gnu.org; Tue, 08 Apr 2014 07:57:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXUeU-0000y0-CH for Guix-devel@gnu.org; Tue, 08 Apr 2014 07:57:27 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:57224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXUeT-0000x2-RL for Guix-devel@gnu.org; Tue, 08 Apr 2014 07:57:18 -0400 In-Reply-To: (Manolis Ragkousis's message of "Mon, 7 Apr 2014 22:57:29 +0000") 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: Manolis Ragkousis Cc: Guix-devel@gnu.org Manolis Ragkousis skribis: > While I pass to it a specific commit, it downloads a different > (older?) version. I have prepared a testcase with the libpthread, > which is the one that this happens. It will download the files and > then the building will fail, so just compare the file > sysdeps/mach/hurd/pt-sysdep.h with the same file from the commit > e2ae1c43d168fc6f8b34332cbb0656e5d107cbf3 in master. They are > different. > > Build it with "./pre-inst-env guix build libpthread -K" The build log I have for =E2=80=98guix build -S libpthread=E2=80=99 is: --8<---------------cut here---------------start------------->8--- Cloning into '/gnu/store/hq89ni9pgbsh989kybdv2fgllsyl8aqs-libpthread'... Checking connectivity... done Note: checking out 'e2ae1c43d168fc6f8b34332cbb0656e5d107cbf3'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at e2ae1c4... Merge branch 'foo' output path `/gnu/store/hq89ni9pgbsh989kybdv2fgllsyl8aqs-libpthread' should= have r:sha256 hash `0bb8m0pk7b53sww4ahjds77bvqy0alz54g3aylzwncfca52gacqp',= instead has `0h4k81bkygswcm8s4nwbq9p3gyy3v11syd70vdi5h0sj0jr93y55' @ build-failed /gnu/store/152jws5fqk7vy0s9j8shnxcmxz9il8cv-libpthread.drv -= 1 output path `/gnu/store/hq89ni9pgbsh989kybdv2fgllsyl8aqs-libpthread' sho= uld have r:sha256 hash `0bb8m0pk7b53sww4ahjds77bvqy0alz54g3aylzwncfca52gacq= p', instead has `0h4k81bkygswcm8s4nwbq9p3gyy3v11syd70vdi5h0sj0jr93y55' guix build: error: build failed: build of `/gnu/store/152jws5fqk7vy0s9j8shn= xcmxz9il8cv-libpthread.drv' failed --8<---------------cut here---------------end--------------->8--- As you can see, it does check out commit e2ae1c4. However, the result doesn=E2=80=99t have the sha256 hash that appears in the recipe, so it fails (meaning: it cannot possibly go further and start building libpthread.) What you should be doing is this: 1. manually do a git checkout of the exact commit that you want; 2. run =E2=80=98rm -rf .git=E2=80=99 in the checkout; 3. run =E2=80=98guix hash -r .=E2=80=99 in the checkout; 4. put that hash in the recipe. >From there, =E2=80=98guix build -S libpthread=E2=80=99 should succeed, and = you=E2=80=99ll be sure it corresponds to the very commit that you have before your eyes. Can you try that and report back? Thanks, Ludo=E2=80=99.