Skip to content

EPERM on hardlinking files is not rescued when packaging a dir #253

Merged
merged 1 commit into from Sep 7, 2012

2 participants

@JacekLach

Reproduction steps:

mkdir /tmp/fpmlinks
sudo touch /tmp/fpmlinks/sufile
sudo ln -s sufile /tmp/fpmlinks/sulink
fpm -s dir -t deb -n links /tmp/fpmlinks
(...)/gems/fpm-0.4.14/lib/fpm/package/dir.rb:112:in `link': Operation not permitted - (/tmp/fpmlinks/sufile, /tmp/package-dir-staging20120829-19938-msthu0/tmp/fpmlinks/sufile) (Errno::EPERM)
    from /home/jacek/.rvm/gems/ruby-1.9.3-p194/gems/fpm-0.4.14/lib/fpm/package/dir.rb:112:in `copy'
    from /home/jacek/.rvm/gems/ruby-1.9.3-p194/gems/fpm-0.4.14/lib/fpm/package/dir.rb:79:in `block in clone'
    from /home/jacek/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/find.rb:41:in `block in find'
    from /home/jacek/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/find.rb:40:in `catch'
    from /home/jacek/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/find.rb:40:in `find'
(...)
@JacekLach JacekLach Try copying file when linking fails with EPERM
Thus files that are owned by different users but can be copied will not
break packaging.
cdee7ae
@jordansissel
Owner

Cool beans! Thanks for the patch :)

@jordansissel jordansissel merged commit 649b47c into jordansissel:master Sep 7, 2012
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014
jls Reject dependencies with commas (#253) and offer alternatives 37f37ea
@prof-milki prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014
@jordansissel Reject dependencies with commas (#253) and offer alternatives a0b46bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.