Re: dpkg and hardlinks
Raphael Hertzog wrote:
> On Tue, 24 Mar 2009, Jerome Warnier wrote:
>
>> For files from packages, though, deduplication might be a good idea, as
>> dpkg is supposedly the only one to ever modify the files (under /usr for
>> example).
>> I don't know however how dpkg treats hardlinks. Does it "break" the
>> hardlink before replacing a file or does it replace the file whatever
>> its real nature is?
>>
>
> IIRC dpkg preserves hardlinks inside a binary package but I don't see how
> it could do the same across multiple binary packages.
>
Oh, I didn't expect it to. I just wanted to know its behaviour when it
upgrades a package.
Before the upgrade, the file is a hardlink (because I hardlinked it
manually), then it tries to upgrade the file/hardlink. Does it "break"
the hardlink* before upgrading the file or does it overwrite the
file/hardlink and all of its "siblings"?
> Cheers,
>
* because it knows it is supposed to be a plain file, and it no longer is.
Reply to: