[oe-commits] [bitbake] branch master-next updated: workaround path too long issues

git at git.openembedded.org git at git.openembedded.org
Thu Jul 13 22:29:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
     new 4d774b6  workaround path too long issues
4d774b6 is described below

commit 4d774b654db8085e4fa4688839a5f94ee9660af2
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Jul 13 23:27:22 2017 +0100

    workaround path too long issues
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/process.py | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 1d5ef7b..9e181aa 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -326,7 +326,13 @@ class BitBakeServer(object):
             os.unlink(sockname)
  
         self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-        self.sock.bind(sockname)
+        # AF_UNIX has path length issues so chdir here to workaround
+        cwd = os.getcwd()
+        try:
+            os.chdir(os.path.dirname(sockname))
+            self.sock.bind(os.path.basename(sockname))
+        finally:
+            os.chdir(cwd)
         self.sock.listen(1)
 
         os.set_inheritable(self.sock.fileno(), True)
@@ -352,7 +358,13 @@ class BitBakeServer(object):
 def connectProcessServer(sockname, featureset):
     # Connect to socket
     sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
-    sock.connect(sockname)
+    # AF_UNIX has path length issues so chdir here to workaround
+    cwd = os.getcwd()
+    try:
+        os.chdir(os.path.dirname(sockname))
+        sock.connect(os.path.basename(sockname))
+    finally:
+        os.chdir(cwd)
 
     # Send an fd for the remote to write events to
     readfd, writefd = os.pipe()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list