aces / cbrain

CBRAIN is a flexible Ruby on Rails framework for accessing and processing of large data on high-performance computing infrastructures.
GNU General Public License v3.0
70 stars 43 forks source link

is -l switch needed when invoking rsync ? #1361

Open MontrealSergiy opened 8 months ago

MontrealSergiy commented 8 months ago

-a (ARCHIVE) option of rsync should already include -l (symlinks)

prioux commented 8 months ago

I don't understand the context of this issue. What is the problem? Which rsync? We use rsync all over the place in CBRAIN.

For data providers, we already have, as a matter of design decision, that symbolic links are preserved as-is. So the rsync options used by the data provider code already does that.

prioux commented 8 months ago

So can we close this?

MontrealSergiy commented 8 months ago

The context is that the rsync commands containing both -a and -l can be shortened

MontrealSergiy commented 8 months ago

but up to you

prioux commented 8 months ago

I did not understand you original ticket. The subject and description shoudl have said all that. e.g.

Subject: rsync commands have -l option
Description: in the data provider class (file.rb at line xyz and xyz)
the rsync command is invoked. In the options, both the "-a" and "-l"
options are specified. Given that -l is already implied by -a, is
the -l really necessary?

As you can see, providing a full description of what goes on would have prevented a lot of back and forth.

And the answer is: it is probable that some older versions of rsync did not imply -l with -a, and that is why I originally wrote the command like that. Since there is no harm, let's no change it, especailly since we're still connecting to legacy systems where the old behavior might be still active.

MontrealSergiy commented 8 months ago

Actually, the first release of rsync in 1996 already was like that ( -a included -l) because these options where modelled on tar.

The source archive is still available at https://download.samba.org/pub/rsync/src

At the same time there is no harm in a redundant option indeed , but would you mind in the upcoming code I skip -l