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

Bug#535577: debian-policy: what to do with user-generated data (databases) on purge



Jonathan Yu <jonathan.i.yu@gmail.com> writes:
> On Sat, Jul 4, 2009 at 5:08 PM, Russ Allbery<rra@debian.org> wrote:
>> Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr> writes:

>>> I tend to agree with you, but I think there is a more fundamental
>>> issue:  user-generated content should not be stored in /var and
>>> should not created and removed by maintainer scripts. (In other
>>> word, clearly separated from automatically generated data like MTA
>>> queue, etc).

>> This creates a different problem, namely that now you have to ask the
>> user to create a space for that data to be stored and configure the
>> package to put it there, which increases the complexity of the
>> package setup.  I'm not sure that's a good tradeoff.

> Is it too much to ask to have a debconf-like thing pop up and say
> "Hey, I notice you've got postgres-8.3 data, shall we migrate it to
> 8.4 for you?"

I think we'd all agree that this is the best solution to this specific
problem.

> Or on removal, something like "Removing this package will remove your
> data in blahblah. Are you sure you want to continue?" or better yet
> "Do you want to remove the data in blahblah? [Yes] [No]" -- so you
> could uninstall the package while retaining your own data.

This is what some packages currently do and is what Manoj was referring
to, I think.  Personally, I consider this best practice.

> I would say that nothing even in /var should be removed without the
> user's consent.  Maybe something like a checklist that's like:
> [X] Remove log filles
> [ ] Remove database files
>
> etc. There are such things during the uninstallation of most programs
> on Windows, so why not Debian?

Policy currently requires that log files be removed on purge and if one
doesn't want the log files removed, don't purge the package.  I'd rather
not go the route of adding more prompting when we have a clear policy
already in that area that works reasonably well.

However, that aside, there are other places where this comes up.
Removing users added at package installation is another great example.
But I'm not sure that prompting is the best solution to the problem.

Prompting is to some extent a cop-out that we should avoid using if
there's any good choice or any other way that we can proceed reasonably
without bothering the user.  But purging user-generated databases seems
like a good case where we really don't have any idea what to do and
there are common cases where both possible decisions are the right move.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: