Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 29343

Summary: hard links are not maintained
Product: Portage Development Reporter: SpanKY <vapier>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED CANTFIX    
Severity: normal CC: mr_bones_
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description SpanKY gentoo-dev 2003-09-22 10:14:34 UTC
since the files are just copied over from ${D} to ${ROOT}, hard link information
is lost ...

from an ebuild:
src_install() {
    dobin plis
    dohard /usr/bin/plis /usr/bin/pcon
}
emerge output:
>>> /usr/bin/plis
>>> /usr/bin/pcon
actual files:
root@vapier 0 pipes-1.15 # ls -ali /usr/bin/plis /usr/bin/pcon 
 592512 -rwxr-xr-x    1 root     root        12344 Sep 22 13:12 /usr/bin/pcon
 591086 -rwxr-xr-x    1 root     root        12344 Sep 22 13:12 /usr/bin/plis
Comment 1 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-02 14:12:15 UTC
I think it's fixed now in portage-2.0.49-r16.
Can you reproduce it?
Comment 2 SpanKY gentoo-dev 2003-11-03 11:45:48 UTC
still bugged in -r16 ... `emerge pipes` and then run `ls -ali /usr/bin/plis
/usr/bin/pcon` if you want an ebuild to test on :p
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2003-12-24 12:52:25 UTC
This would be fairly complicated to achieve.
I recommend recovering manually in postinst
to get the real hardlinks back.

This won't be resolved for a while.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2005-12-04 08:53:52 UTC
CANTFIX as this cannot be fixed properly for the case of hardlinks between
different dirs.
It is possible for the mentioned case of a hardlink between files in one dir,
however it's really not worth the effort, as we would have to scan the inode
numbers of each file and check for duplicates, then instead of copying both
files copy just one and create the hardlink for the other. And CONFIG_PROTECT
doesn't make it easier ...
IOW, unless this causes some _real_ problems I'd rather not do it.