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