1 |
Change FETCHCOMMAND_RSYNC to use '-Lt' over '-a'. Notably, this |
2 |
replaces --links with --copy-links option, i.e. makes rsync copy |
3 |
underlying files when symlinks are met. This is important since |
4 |
we do not transfer symlink targets, therefore '-l' ends up creating |
5 |
dangling symlinks. |
6 |
|
7 |
This also removes most of the other options that are irrelevant or even |
8 |
undesirable to distfile fetching, that is: |
9 |
|
10 |
- '-r' since we always fetch a single file, so recursive operation is |
11 |
unnecessary |
12 |
- '-p', '-o', '-g' since we want to apply our permissions and ownership |
13 |
for distfiles rather than copying the one from mirrors, |
14 |
- '-D' since we do not expect any devices or specials in distfiles. |
15 |
|
16 |
Copying timestamps is preserved in case it's helpful in determining |
17 |
whether files need to be refetched. |
18 |
|
19 |
Bug: https://bugs.gentoo.org/698046 |
20 |
Signed-off-by: Michał Górny <mgorny@g.o> |
21 |
--- |
22 |
cnf/make.globals | 4 ++-- |
23 |
1 file changed, 2 insertions(+), 2 deletions(-) |
24 |
|
25 |
diff --git a/cnf/make.globals b/cnf/make.globals |
26 |
index 9eeb7a01e..50511e812 100644 |
27 |
--- a/cnf/make.globals |
28 |
+++ b/cnf/make.globals |
29 |
@@ -38,8 +38,8 @@ PORTAGE_TMPDIR="/var/tmp" |
30 |
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" |
31 |
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" |
32 |
|
33 |
-FETCHCOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\"" |
34 |
-RESUMECOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\"" |
35 |
+FETCHCOMMAND_RSYNC="rsync -LtvP \"\${URI}\" \"\${DISTDIR}/\${FILE}\"" |
36 |
+RESUMECOMMAND_RSYNC="rsync -LtvP \"\${URI}\" \"\${DISTDIR}/\${FILE}\"" |
37 |
|
38 |
# NOTE: rsync will evaluate quotes embedded inside PORTAGE_SSH_OPTS |
39 |
FETCHCOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\"" |
40 |
-- |
41 |
2.23.0 |