[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#33893: closed ([PATCH 0/2] Add docker.)

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#33893: closed ([PATCH 0/2] Add docker.)
Date: Thu, 10 Jan 2019 08:51:02 +0000

Your message dated Thu, 10 Jan 2019 09:50:49 +0100
with message-id <address@hidden>
and subject line Re: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine.
has caused the debbugs.gnu.org bug report #33893,
regarding [PATCH 0/2] Add docker.
to be marked as done.

(If you believe you have received this mail in error, please contact

33893: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33893
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH 0/2] Add docker. Date: Fri, 28 Dec 2018 11:13:11 +0100
Danny Milosavljevic (2):
  gnu: Add docker-engine.
  gnu: Add docker-cli.

 gnu/packages/docker.scm | 144 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 144 insertions(+)

--- End Message ---
--- Begin Message --- Subject: Re: [bug#33893] [PATCH v5 2/4] gnu: Add docker-engine. Date: Thu, 10 Jan 2019 09:50:49 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Danny Milosavljevic <address@hidden> skribis:

> On Tue, 08 Jan 2019 09:42:14 +0100
> Ludovic Courtès <address@hidden> 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.  
>> I see Leo is Cc’d so we’ll 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.

Are you sure?  In the Linux port of glibc I see this:

--8<---------------cut here---------------start------------->8---
char *
__getcwd (char *buf, size_t size)
  char *path;
  char *result;

  // […]

  retval = INLINE_SYSCALL (getcwd, 2, path, alloc_size);
--8<---------------cut here---------------end--------------->8---

And indeed, there’s a ‘getcwd’ syscall:

--8<---------------cut here---------------start------------->8---
$ strace -e getcwd guile -c '(getcwd)'
getcwd("/home/ludo", 100)               = 11
+++ exited with 0 +++
--8<---------------cut here---------------end--------------->8---

> 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 later
> 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* 
> wrong.
> Solution: Set environment variable PWD to the correct name of the directory.

Great that you found a solution.

Thanks for taking the time to address this!


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]