git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cross-directory hard links
@ 2009-05-11 10:41 Cedric Staniewski
  2009-05-11 11:02 ` [PATCH] Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Johannes Schindelin
  2009-05-11 16:40 ` Cross-directory hard links Tony Finch
  0 siblings, 2 replies; 6+ messages in thread
From: Cedric Staniewski @ 2009-05-11 10:41 UTC (permalink / raw)
  To: git

Hi everybody,

git commit 6a0861 [1] made bin/git the target of the builtins hard links which
results in 'cross-directory' hard links. While the Makefile always works fine
for the local installation via 'make install', these links can raise trouble
when installing git via package manager.

The problem only occurs on systems where git's bin and lib directories will be
installed on different file systems, e.g. if /usr and /usr/lib are different
mount points. If you attempt to install a git package which was built with
DESTDIR=/usr and contains such hard links, tar will fail to extract either
bin/git or the builtins (depending on how tar resolves the hard links)
complaining about a 'Invalid cross-device link'.

I know such a setup is probably quite rare, but the problem can easily be fixed
by always copying bin/git to lib/git-add instead of hard linking it.

Cheers,
Cedric

[1]
http://git.kernel.org/?p=git/git.git;a=commit;h=6a0861a8a3295395238c8126c6e74c66b715c595

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-11 20:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-11 10:41 Cross-directory hard links Cedric Staniewski
2009-05-11 11:02 ` [PATCH] Add NO_CROSS_DIRECTORY_HARDLINKS support to the Makefile Johannes Schindelin
2009-05-11 16:29   ` Cedric Staniewski
2009-05-11 19:08     ` Johannes Schindelin
2009-05-11 20:05       ` Cedric Staniewski
2009-05-11 16:40 ` Cross-directory hard links Tony Finch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).