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

Re: Can /usr/share/doc/<pkg> be deleted on upgrade ?




Le 26 nov. 09 à 14:40, Lucas B. Cohen a écrit :

Eduardo M KALINOWSKI wrote:
On Qui, 26 Nov 2009, "Lucas B. Cohen" wrote:

Is it considered acceptable for a package to blindly delete, then
recreate its entire directory under /usr/share/doc upon installation or
upgrade ?


Why exactly do you want to do that? What do you want to achieve?

I'm triaging bugs opened against the Bacula package, and a patch has
been submitted to a .preinst file that can swipe /usr/share/doc/bacula
during upgrades.


I suppose you mean:
bacula: usr-share-doc-symlink-without-dependency
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554197

The idea is to delete the directory in order to replace it by a symlink.
In my opinion, it is OK to do that because:

I'm wondering if I need to take extend the patch to
take care and conditionally backup this directory (in case for example
a sysadmin has stored his personal documentation in there).

sysadmins should not do that. If they don't want to lose data, they should use

/usr/local/doc for local documentation,
/etc for configuration,
/root for... I don't know, mostly temporary files during configuration
/home for data files (aka "Documents").

In essence, there is a provision in the Debian policy so that it's harmless for sysadmins to REMOVE files from /usr/share/doc, not to ADD files there.

Besides, the rm -f is there precisely to remove supplementary files that can only be there only if the sysadmin has put them here. So it's a bit of a no-go to check whether the directory is empty before you force-delete it...

Regards, Thibaut.


Reply to: