Opened 16 years ago

Last modified 13 years ago

#13601 closed defect

MacPorts doesn't respect hard links during install phase — at Version 5

Reported by: julien.thewys@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.0.0
Component: base Version: 1.5.2
Keywords: tcl hard link Cc:
Port: git-core

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Just installed macports and git-core on 10.5 . I can see that lots of generated bin are just the same file:

cd /opt/local/bin;
for i in git-*; do diff -qs $i git-tag; done | grep identical | wc

Some "cp" could be replaced by "ln" in the build process.

Change History (5)

comment:1 Changed 16 years ago by jmpp@…

Milestone: Port Enhancements

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: bryan@… added
Owner: changed from macports-tickets@… to mgrimes@…

Assign/Cc maintainers.

comment:3 Changed 16 years ago by blb@…

Cc: bryan@… removed
Component: portsbase
Keywords: tcl hard link added
Milestone: Port EnhancementsMacPorts base bugs
Owner: changed from mgrimes@… to macports-tickets@…
Summary: git-core hard linkMacPorts doesn't respect hard links during install phase
Type: enhancementdefect

git-core does use hard links in the destroot, so the issue is actually with MacPorts base. It currently doesn't look for hard links when going from destroot to install, hence each file is then copied instead of hard linked.

The question is how easy/difficult it would be to detect hard linked files in Tcl, since 'file type' appears to only return 'link' which is a symlink, and 'file' for hard links (since it looks like a file).

comment:4 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

I thought that was the point of hard links -- that they are indistinguishable from real files. So there's no way for base to fix this.

So isn't the fix for the for git-core to install those files as symlinks instead of hard links?

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Note: See TracTickets for help on using tickets.