[Rpm-maint] FSM hooks for rpm plugin

Reshetova, Elena elena.reshetova at intel.com
Mon Mar 11 12:01:56 UTC 2013

>A file is a hard-link if (S_ISREG(st->st_mode) && st->st_nlink > 1) is true. 
>When erasing, we get this info from filesystem so that remains accurate (the 
>last one would be seen as the "real" file). On installation the stat struct 
>of a file is made up by rpm, so we can pass whatever we want in there. 
>Currently >st_nlink for hardlinks equals the total number of links a file 
>will have, but we can easily change that to the number of *current* links so 
>that it better matches reality. Ie the first one will have st_nlink == 1 so 
>it will be seen as the real file, the rest will st_nlink++ each. See attached 
>patch for a quick >implementation of this.

Oh, I guess I just wanted to say that after file is installed there is no way 
to determine where is the initial file and where is the hard link, but indeed 
in rpm case for installation, it can be indicated (as your patch does) by rpm, 
so I guess it is all fine, then :)

Best Regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7220 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20130311/648c15e3/attachment.p7s>

More information about the Rpm-maint mailing list