summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-02 12:04:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-07 20:05:31 +0000
commit2345af9b4829ed3eed5abf60f2483055649f8af7 (patch)
tree96a9a31e4b1957b93c4fe3eb669117d2752caf0d /meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
parentc4901328fe5cf912c0965e5b011b64a95a9bcb9d (diff)
downloadpoky-uninative-1.5.tar.gz
recipes: Move out stale GPLv2 versions to a seperate layeruninative-1.5
These are recipes where the upstream has moved to GPLv3 and these old versions are the last ones under the GPLv2 license. There are several reasons for making this move. There is a different quality of service with these recipes in that they don't get security fixes and upstream no longer care about them, in fact they're actively hostile against people using old versions. The recipes tend to need a different kind of maintenance to work with changes in the wider ecosystem and there needs to be isolation between changes made in the v3 versions and those in the v2 versions. There are probably better ways to handle a "non-GPLv3" system but right now having these in OE-Core makes them look like a first class citizen when I believe they have potential for a variety of undesireable issues. Moving them into a separate layer makes their different needs clearer, it also makes it clear how many of these there are. Some are probably not needed (e.g. mc), I also wonder whether some are useful (e.g. gmp) since most things that use them are GPLv3 only already. Someone could now more clearly see how to streamline the list of recipes here. I'm proposing we mmove to this separate layer for 2.3 with its future maintinership and testing to be determined in 2.4 and beyond. (From OE-Core rev: 19b7e950346fb1dde6505c45236eba6cd9b33b4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch')
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch120
1 files changed, 0 insertions, 120 deletions
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
deleted file mode 100644
index 5452b46bbc..0000000000
--- a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-6.9-cp-i-u.patch
+++ /dev/null
@@ -1,120 +0,0 @@
1Upstream-Status: Inappropriate [legacy version]
2
3This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
4
5The package is stated as being Licensed as GPLv2+.
6
7Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
8
9----
10
11When "cp -i --update old new" would do nothing because "new" is
12newer than "old", cp would nonetheless prompt for whether it is
13ok to overwrite "new". Then, regardless of the response (because
14of the --update option), cp would do nothing.
15
16The following patch eliminates the unnecessary prompt in that case.
17
18diff --git a/src/copy.c b/src/copy.c
19index b7bf73b..0e549d2 100644
20--- a/src/copy.c
21+++ b/src/copy.c
22@@ -1210,6 +1210,30 @@ copy_internal (char const *src_name, char const *dst_name,
23 return false;
24 }
25
26+ if (!S_ISDIR (src_mode) && x->update)
27+ {
28+ /* When preserving time stamps (but not moving within a file
29+ system), don't worry if the destination time stamp is
30+ less than the source merely because of time stamp
31+ truncation. */
32+ int options = ((x->preserve_timestamps
33+ && ! (x->move_mode
34+ && dst_sb.st_dev == src_sb.st_dev))
35+ ? UTIMECMP_TRUNCATE_SOURCE
36+ : 0);
37+
38+ if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
39+ {
40+ /* We're using --update and the destination is not older
41+ than the source, so do not copy or move. Pretend the
42+ rename succeeded, so the caller (if it's mv) doesn't
43+ end up removing the source file. */
44+ if (rename_succeeded)
45+ *rename_succeeded = true;
46+ return true;
47+ }
48+ }
49+
50 /* When there is an existing destination file, we may end up
51 returning early, and hence not copying/moving the file.
52 This may be due to an interactive `negative' reply to the
53@@ -1302,30 +1326,6 @@ copy_internal (char const *src_name, char const *dst_name,
54 return false;
55 }
56 }
57-
58- if (x->update)
59- {
60- /* When preserving time stamps (but not moving within a file
61- system), don't worry if the destination time stamp is
62- less than the source merely because of time stamp
63- truncation. */
64- int options = ((x->preserve_timestamps
65- && ! (x->move_mode
66- && dst_sb.st_dev == src_sb.st_dev))
67- ? UTIMECMP_TRUNCATE_SOURCE
68- : 0);
69-
70- if (0 <= utimecmp (dst_name, &dst_sb, &src_sb, options))
71- {
72- /* We're using --update and the destination is not older
73- than the source, so do not copy or move. Pretend the
74- rename succeeded, so the caller (if it's mv) doesn't
75- end up removing the source file. */
76- if (rename_succeeded)
77- *rename_succeeded = true;
78- return true;
79- }
80- }
81 }
82
83 if (x->move_mode)
84diff --git a/tests/mv/update b/tests/mv/update
85index 0c06024..6c3d149 100755
86--- a/tests/mv/update
87+++ b/tests/mv/update
88@@ -1,7 +1,7 @@
89 #!/bin/sh
90 # make sure --update works as advertised
91
92-# Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
93+# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
94
95 # This program is free software; you can redistribute it and/or modify
96 # it under the terms of the GNU General Public License as published by
97@@ -46,11 +46,16 @@ fi
98
99 fail=0
100
101-for cp_or_mv in cp mv; do
102- # This is a no-op.
103- $cp_or_mv --update old new || fail=1
104- case "`cat new`" in new) ;; *) fail=1 ;; esac
105- case "`cat old`" in old) ;; *) fail=1 ;; esac
106+for interactive in '' -i; do
107+ for cp_or_mv in cp mv; do
108+ # This is a no-op, with no prompt.
109+ # With coreutils-6.9 and earlier, using --update with -i would
110+ # mistakenly elicit a prompt.
111+ $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1
112+ test -s out && fail=1
113+ case "`cat new`" in new) ;; *) fail=1 ;; esac
114+ case "`cat old`" in old) ;; *) fail=1 ;; esac
115+ done
116 done
117
118 # This will actually perform the rename.
119--
1201.5.3.rc1.16.g9d6f