Cross-directory hard links

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cedric Staniewski
Date: Monday, May 11, 2009 - 3:41 am

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Cross-directory hard links, Cedric Staniewski, (Mon May 11, 3:41 am)
[PATCH] Add NO_CROSS_DIRECTORY_HARDLINKS support to the Ma ..., Johannes Schindelin, (Mon May 11, 4:02 am)
Re: [PATCH] Add NO_CROSS_DIRECTORY_HARDLINKS support to th ..., Cedric Staniewski, (Mon May 11, 9:29 am)
Re: Cross-directory hard links, Tony Finch, (Mon May 11, 9:40 am)
Re: [PATCH] Add NO_CROSS_DIRECTORY_HARDLINKS support to th ..., Johannes Schindelin, (Mon May 11, 12:08 pm)
Re: [PATCH] Add NO_CROSS_DIRECTORY_HARDLINKS support to th ..., Cedric Staniewski, (Mon May 11, 1:05 pm)