bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Don't dereference symlinks in #install #143

Closed phyber closed 8 years ago

phyber commented 8 years ago

Prevents FileUtils.cp_r from dereferencing symlinks during #install.

I haven't seen any issues with this in my limited testing so far. My aim was to be able to easily install a directory of libraries and their symlinks when creating "broken out" packages (ie. thing, thing-libs, etc).

For example: with this patch lib('thing').install Dir.glob('/some/path/usr/lib/*.so*') will successfully copy the libraries and symlinks to lib('thing') without dereferencing the symlinks thus avoiding the need for workarounds in this situation.

I also ignored vim backups in the .gitignore.

phyber commented 8 years ago

An alternate implementation here if this patch is unacceptable may be to enable the passing of an options hash down to the FileUtils.cp_r, then nobody has their toes stepped on and can provide their own options for specific situations.

bernd commented 8 years ago

Thank you! :smiley: