Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #365 producing huge packages because of hard links #623

Closed
wants to merge 1 commit into from

Conversation

@v-yarotsky
Copy link
Contributor

v-yarotsky commented Jan 22, 2014

Following the discussion in #365, here is the implementation of tracking source device and inode numbers to preserve hard links. I was finally able to build git package with fpm 馃.

@v-yarotsky

This comment has been minimized.

Copy link
Contributor Author

v-yarotsky commented Jan 23, 2014

Turned out to break some things, will investigate in a short while.

FileUtils.copy_entry(src, dst)
# if the file with the same dev and inode has been copied already -
# hard link it's copy to `dst`, otherwise make an actual copy
st = File.stat(src)

This comment has been minimized.

Copy link
@jordansissel

jordansissel Mar 7, 2014

Owner

I wonder if File.lstat() is more correct here (otherwise we're following a symlink which may not be waht we want to do)

I'll fiddle with this post-merge and try to write a test for it.

@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Mar 7, 2014

testing now! :)

jordansissel added a commit that referenced this pull request Mar 7, 2014
Also added a test to cover hardlink support for FPM::Util.copy_entry
jordansissel added a commit that referenced this pull request Mar 7, 2014
Also added a test to cover hardlink support for FPM::Util.copy_entry
jordansissel added a commit that referenced this pull request Mar 7, 2014
Add tests and some style cleanup - builds on #623
@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Mar 7, 2014

I made some small changes to this PR in #659 and merged it.

This is now merged and has tests. Thank you! :)

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014
Also added a test to cover hardlink support for FPM::Util.copy_entry
prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014
prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014
Also added a test to cover hardlink support for FPM::Util.copy_entry
prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014
jordansissel added a commit that referenced this pull request Apr 24, 2015
Also added a test to cover hardlink support for FPM::Util.copy_entry
jordansissel added a commit that referenced this pull request Apr 24, 2015
Add tests and some style cleanup - builds on #623
jordansissel added a commit that referenced this pull request Jun 20, 2016
Also added a test to cover hardlink support for FPM::Util.copy_entry
jordansissel added a commit that referenced this pull request Jun 20, 2016
Add tests and some style cleanup - builds on #623
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.