Fails to patch a broken symlink when using --backup and multiple filesystems
Bug #685538 reported by
Loïc Minier
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Patch |
Unknown
|
Unknown
|
|||
patch (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: patch
Hi
When patching a symlink to a non-existent directory and using --backup, patch renames some files from TMPDIR (/tmp by default) into the current directory. This fails if it's not on the same filesystem.
Here's a test case:
mkdir test; cd test
ln -sf foo/foo bar
patch -p0 --backup <<EOF
diff bar bar
--- /dev/null
+++ bar
@@ -0,0 +1 @@
+coin
EOF
This fails with:
patching file bar
patch: **** Can't create file bar : No such file or directory
/!\ This only fails if your current directory is in a different filesystem than /tmp.
This works around the bug: mkdir ./tmp; TMPDIR=./tmp
Cheers,
Changed in patch: | |
importance: | Undecided → Unknown |
status: | New → Unknown |
To post a comment you must log in.