summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/files
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-03 17:27:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-07 11:18:38 +0100
commited9789d54d353af5717fdbedf1c578911b82c247 (patch)
treeaa52f8de3f8ce2974511c4531a2c8d87ba450b8f /meta/recipes-devtools/pseudo/files
parentbd34ad3c2a6f0a930b23322169e47d36e9f65299 (diff)
downloadpoky-ed9789d54d353af5717fdbedf1c578911b82c247.tar.gz
pseudo: Add pathfix patch
Add a path to fix up handling of dirfd being passed as a full file and with path="". (From OE-Core rev: 3006bbe7768e4efe33d3d2d3f5786a561ecbe96f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pseudo/files')
-rw-r--r--meta/recipes-devtools/pseudo/files/pathfix.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/pathfix.patch b/meta/recipes-devtools/pseudo/files/pathfix.patch
new file mode 100644
index 0000000000..b3e63fa28f
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/pathfix.patch
@@ -0,0 +1,25 @@
1We're seeing systems in the wild (e.g. ubuntu 20.04) which call
2with a dirfd set to the full filename and path set to "". Since
3this seems to be expected to work, handle it accordingly.
4
5Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6Upstream-Status: Pending
7
8Index: git/pseudo_client.c
9===================================================================
10--- git.orig/pseudo_client.c
11+++ git/pseudo_client.c
12@@ -1549,8 +1549,12 @@ base_path(int dirfd, const char *path, i
13
14 if (!path)
15 return NULL;
16- if (!*path)
17+
18+ if (!*path) {
19+ if (dirfd != -1 && dirfd != AT_FDCWD)
20+ return fd_path(dirfd);
21 return "";
22+ }
23
24 if (path[0] != '/') {
25 if (dirfd != -1 && dirfd != AT_FDCWD) {