[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#22935: PROPOSED] Do not make hardlinks to conffiles



> > Some time ago I discovered how bad dpkg handled hardlinks to conffiles in
> > one of the packages I maintain, smartlist.
> > 
> > If you create a list "foo", it will have a file in /var/list/foo/rc.submit
> > which is just a hardlink to /var/list/.etc/rc.submit.
> > 
> > However, if you change /var/list/.etc/rc.submit, and upgrade the package
> > using dpkg, it is likely that /var/list/foo/rc.submit becomes hardlinked
> > to /var/list/.etc/rc.submit.dpkg-old, usually not what you would expect.
> > 
> > [ So I changed smartlist so that it used symlinks and not hardlinks ].
> > 
> > I asked in debian-devel "Is this a dpkg bug or it is just that
> > hardlinks to conffiles should be forbidden by policy?"
> > 
> > and then Ian Jackson reported this as a bug against policy.
> > 
> > If you want to make a nicely worded proposal from this (currently
> > informal) bug, I will surely second it, and I assume Ian Jackson would
> > too.
> 
> Fair enough.  So I second Ian's proposal that policy should say, while
> talking about conffiles:
 
> "A package may not make hard links to conffiles.
No problem with this.

>  (This is because it will cause technical problems perhaps leading to
>   incorrect behaviour.)"

This however explains almost nothing when taken out of context with
the above text and will invite later "What technical problems?"
questions (like earlier in this thread ;-)

Either omit it entirely, or better, briefly describe how hard links
will not automatically point to new config files installed by the package
manager, but remain linked to the inodes of the old config files, even
if their 'other' filename is deleted..

(I'm sure someone can describe this for policy better than I just did ;-)

best,
Ron.


Reply to: