coreutils/coreutils-8.24-force-option--override--interactive-option.patch
2019-07-27 19:22:30 +00:00

40 lines
1.5 KiB
Diff

diff -Naur coreutils-8.24/src/cp.c coreutils-8.24.tpg/src/cp.c
--- coreutils-8.24/src/cp.c 2015-06-26 17:04:19.000000000 +0000
+++ coreutils-8.24.tpg/src/cp.c 2015-07-14 20:09:13.652243642 +0000
@@ -997,6 +997,7 @@
break;
case 'f':
+ x.interactive = I_ALWAYS_YES;
x.unlink_dest_after_failed_open = true;
break;
diff -Naur coreutils-8.24/tests/cp/cp-i.sh coreutils-8.24.tpg/tests/cp/cp-i.sh
--- coreutils-8.24/tests/cp/cp-i.sh 2015-06-26 17:04:19.000000000 +0000
+++ coreutils-8.24.tpg/tests/cp/cp-i.sh 2015-07-14 20:09:52.268330234 +0000
@@ -55,9 +55,6 @@
echo n | cp -vfn c d 2>/dev/null > out6 || fail=1
compare out6 out_empty || fail=1
-# do not ask, prevent from overwrite
-echo n | cp -vnf c d 2>/dev/null > out7 || fail=1
-compare out7 out_empty || fail=1
# options --backup and --no-clobber are mutually exclusive
returns_ 1 cp -bn c d 2>/dev/null || fail=1
diff -Naur coreutils-8.24/tests/mv/i-2.sh coreutils-8.24.tpg/tests/mv/i-2.sh
--- coreutils-8.24/tests/mv/i-2.sh 2015-06-26 17:04:19.000000000 +0000
+++ coreutils-8.24.tpg/tests/mv/i-2.sh 2015-07-14 20:10:32.315456259 +0000
@@ -34,11 +34,7 @@
# Before 4.0s, this would not prompt.
cp -if e f < y > out 2>&1 || fail=1
-# Make sure out contains the prompt.
-case "$(cat out)" in
- "cp: replace 'f', overriding mode 0000 (---------)?"*) ;;
- *) fail=1 ;;
-esac
+#(peroyvind) this test is bogus, we don't want to be prompted when forcing
test -f e || fail=1
test -f f || fail=1