> | - Files in /usr/share/doc may not be referenced by any > | program. If such files are needed, they must be placed in > | /usr/share/package-name/, and symbolic links created as required > | in /usr/share/doc/package-name/ > > Does "any program" include postinst scripts?
This was debated here a while ago. There were basically two camps: One camp said that it was ok for the package to do this itself. The rationale was that the system administrator should be able to rm -rf /usr/share/doc/* and have the system still run properly. Since it is unlikely that the administrator would be doing this at the same time as the package is in the process of being installed, this would be ok. Another camp said that this practice should be avoided. The rationale was that administrators might do something more drastic to avoid populating /usr/share/doc in the first place, like mounting it as a read-only partition or using as yet unwritten options to dpkg to not unpack files under particular directories. They said it was safer to just put the conf file in /etc or whereever it belonged and mark it as a conffile and let dpkg's own internal conffile handling take care of conflicts. I'd agree with the second position. > I would be forced to move these files to /usr/share, and to add > special code to my maintainer scripts to link them to /usr/share/doc. No, don't do that. > Or would it be a possible way not to put the default config files to > /usr/share/doc/$package? Where to put "real" examples that are not > accessed by maintainer scripts? Put them in /etc and mark them as conf files. Eric