coreutils/coreutils-8.2-force-option--override--interactive-option.patch

42 lines
1.5 KiB
Diff

--- coreutils-8.17/src/cp.c.override~ 2012-05-01 22:55:08.000000000 +0200
+++ coreutils-8.17/src/cp.c 2012-05-11 11:56:02.647690415 +0200
@@ -986,6 +986,7 @@ main (int argc, char **argv)
break;
case 'f':
+ x.interactive = I_ALWAYS_YES;
x.unlink_dest_after_failed_open = true;
break;
--- coreutils-8.17/tests/cp/cp-i.override~ 2012-02-03 10:22:06.000000000 +0100
+++ coreutils-8.17/tests/cp/cp-i 2012-05-11 11:56:02.647690415 +0200
@@ -56,8 +56,8 @@ echo n | cp -vfn c d 2>/dev/null > out6
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
+#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
cp -bn c d 2>/dev/null && fail=1
--- coreutils-8.17/tests/mv/i-2.override~ 2012-04-19 19:39:23.000000000 +0200
+++ coreutils-8.17/tests/mv/i-2 2012-05-11 11:57:30.774687787 +0200
@@ -34,11 +34,12 @@ mv -fi c d < y >/dev/null 2>&1 || fail=1
# Before 4.0s, this would not prompt.
cp -if e f < y > out 2>&1 || fail=1
+#(peroyvind) this test is bogus, we don't want to be prompted when forcing
# Make sure out contains the prompt.
-case "$(cat out)" in
- "cp: try to overwrite 'f', overriding mode 0000 (---------)?"*) ;;
- *) fail=1 ;;
-esac
+#case "$(cat out)" in
+# "cp: try to overwrite 'f', overriding mode 0000 (---------)?"*) ;;
+# *) fail=1 ;;
+#esac
test -f e || fail=1
test -f f || fail=1