From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:43758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghPzu-0004zo-S0 for guix-patches@gnu.org; Wed, 09 Jan 2019 21:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghPzt-00085u-0d for guix-patches@gnu.org; Wed, 09 Jan 2019 21:23:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53544) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghPzq-00084o-B2 for guix-patches@gnu.org; Wed, 09 Jan 2019 21:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ghPzq-0001xZ-3L for guix-patches@gnu.org; Wed, 09 Jan 2019 21:23:02 -0500 Subject: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Resent-Message-ID: Date: Thu, 10 Jan 2019 03:22:10 +0100 From: Danny Milosavljevic Message-ID: <20190110032210.1242af1f@scratchpost.org> In-Reply-To: <87va2z1qxl.fsf@gnu.org> References: <20181230121754.775-1-dannym@scratchpost.org> <20181230233903.23426-1-dannym@scratchpost.org> <20181230233903.23426-3-dannym@scratchpost.org> <87pnt9y1v0.fsf@gnu.org> <20190107194455.69823f82@scratchpost.org> <87va2z1qxl.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/RaopOrGzekeyiIby8Epi=o1"; protocol="application/pgp-signature" 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Leo Famulari Cc: 33893@debbugs.gnu.org --Sig_/RaopOrGzekeyiIby8Epi=o1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, Hi Leo, On Tue, 08 Jan 2019 09:42:14 +0100 Ludovic Court=C3=A8s wrote: > > Go has peculiar ideas of how the directory layout is supposed to be set= up. > > I could probably figure it out - but if someone with more Go knowledge = could > > step forward it would be much faster. =20 >=20 > I see Leo is Cc=E2=80=99d so we=E2=80=99ll see. :-) Nevermind, I've fixed it and learned something in the process: Linux doesn't actually know the current working directory as a string. It only knows the inode, so if you call getcwd, what libc actually does is it opendirs "..", then finds the entry with the same inode number as the current directory, and then returns the name of that entry. Now, gopath uses symlinks to set up their preferred directory hierarchy in such a way: ln -s ../../../.. .gopath/src/github.com/docker/docker Now if you chdir into ".gopath/src/github.com/docker/docker" and then Go la= ter does getcwd, it will appear as if the chdir did not succeed (because it will just use the old working directory because it has the same inode). So Go was erroring out because the directory structure there was *still* wr= ong. Solution: Set environment variable PWD to the correct name of the directory. I've pushed this patchset to master. I'll try to add a system test next - let's see. --Sig_/RaopOrGzekeyiIby8Epi=o1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlw2rFIACgkQ5xo1VCww uqVkmgf+NN96Dt8+cclYpjUmAzw2gOIfAEAmBoLdHCAWV+FyLIyEKiJ6gdBQqdMF rkZVtezJhwmfEc34bEEe2VB1CASaL2rN5BVHZYUBIQqrjnj05PULDNAQRbZcXh93 PElhl3a+arHS024WIlirwbvLUV7qTWnNWjvEgCDhitT64hhpVn/FWEzyremlvkuJ 0PUF6bhLzRwvoaSDAZQlRbGWAYV7yoIN2mxWDR2ZyEIDrNQ7JyTbBydWSa4rS7kB 8l0QoLFASDYd1VaPltSHKR3eITgU+rLy3incTcRbIpk8NtFQgkhbRbteCc5WgNnj lE4xAq4o6DsTtpfrOE3ObTX0GxuPJA== =vXcU -----END PGP SIGNATURE----- --Sig_/RaopOrGzekeyiIby8Epi=o1--