summaryrefslogtreecommitdiff
path: root/quilt/patches/patch-wrapper_do_depend_on_proc
blob: 9801889e5a7467a664bf69e7ac2cd6c520ffcafa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Let patch-wrapper die with an informative message when /proc is not mounted
althrough it needs it to pass the patching request to GNU patch since it
fails to understand all options.

---
 bin/patch-wrapper.in |    4 ++++
 1 file changed, 4 insertions(+)

--- a/bin/patch-wrapper.in
+++ b/bin/patch-wrapper.in
@@ -171,6 +171,10 @@ then
     if [ -n "$opt_input" ]
     then
 	patch=$opt_input
+    elif [ ! -e /proc/self ]
+    then
+        echo "patch-wrapper: /proc not mounted!" >&2
+	exit 1
     elif [ -e /proc/self/fd/0 ]
     then
 	patch=$(readlink /proc/self/fd/0)