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

Bug#87711: PROPOSAL] Clarification of example configuration files



On Mon, 26 Feb 2001, Julian Gilbey wrote:

> Package: debian-policy
> Version: 3.5.2.0
> Severity: wishlist
>
> [Following from a thread on -mentors]
>
> The question: can you have a default configuration file in
> /usr/share/doc which is copied by the postinst to /etc if it does not
> yet exist?
>
> On Mon, Feb 26, 2001 at 01:21:06PM +0100, Ove Kaaven wrote:
> > Maybe you misunderstood what I was referring to... of course changing or
> > messing with them isn't, but generating/installing them from e.g.
> > /usr/share/doc/foo/examples is a violation, according to 13.3.
>
> Ah, you're right.  13.3 and 11.7.3 contradict over this point: 13.3
> does not permit accessing it from a program, whereas 11.7.3
> specifically suggests this course of action.
>
> I would like to suggest the following resolution:
>
>     A common practice is to create a script called `<package>-configure'
>     and have the package's `postinst' call it if and only if the
>     configuration file does not already exist.  In certain cases it is
>     useful for there to be an example or template file which the
> -   maintainer scripts use.  Such files should be in `/usr/share/doc' if
> -   they are examples or `/usr/lib' if they are templates, and should be
> -   perfectly ordinary `dpkg'-handled files (_not_ `conffiles').
> +   maintainer scripts use.  Such files should be in
> +   `/usr/share/<package>' or `/usr/lib/<package>', with a symbolic
> +   link from `/usr/share/doc/<package>/examples' if they are
> +   examples, and should be perfectly ordinary `dpkg'-handled files
> +   (_not_ `conffiles').

I second this.

> The reason I'm suggesting this is that there is talk of dpkg being
> able to selectively ignore (not install) certain directory trees.
> Now, if someone decides to ignore /usr/share/doc, the original method
> will break, but this one will still work. [...]

I fully agree. I had to remove /usr/share/doc and /usr/doc in my home
computer to free up some disk space, and I am worried that some packages
could behave differently now. As an example, this is from debconf-tiny.postrm
in potato:

# Only remove database if niether debconf nor debconf-tiny are installed.
if [ "$1" = "purge" -a \
     ! -e /usr/share/doc/debconf/copyright -a \
     ! -e /usr/share/doc/debconf-tiny/copyright ]; then
        rm -f /var/lib/debconf/debconf.db /var/lib/debconf/templates.db
fi

This will not work anymore if I removed /usr/share/doc.

> Please keep the discussion to the BTS only, which is automatically
> copied to -policy, so that this doesn't get discussed on three mailing
> lists.

X-Debbugs-Cc: is your friend :-)




Reply to: