software-center and remove vs. purge

2010-12-07 Thread Michael Vogt
Hi,

I recently came accross the following brainstorm.ubuntu.com idea that
discusses remove vs purge in softare-center:
http://brainstorm.ubuntu.com/idea/24963/
and I would like to discuss it here.

Let me briefly recap the difference between the two. The removal
means that the content of the package gets removed from the
filesystem. With purge the package content *and* the system config
files (usually in /etc) will get removed as well. Some package will
also do additional removal (like removing the mythtv-database content
when purging mythtv-database leading to people losing data).

This is not a easy problem and we need to carefully balance the needs
to keep the UI simple with the needs to keep the system from
accumulating cruft. There are good suggestions in the brainstorm
entry. I think that while in 99(,9 probably)% of all cases a purge is
fine the cost for the error in the remaining cases can be pretty high
(consider someone spending a lot of time tweaking their
squid.conf). So software-center errs on the safe side and defaults to
remove currently.

Its difficult to tell programmatically what is going to happen when
the maintainer script is called with purge as this is a shell
script. Our tools can estimate what amount of data the configuration
file was using (and even if the user ever modified it or not) but not
what additional steps the maintainer script will take (unless of
course there is not maintainer script or no purge target in it :)

That being said I think we should make it easy for the user to access
the purge functionality both inside software-center and
computer-janitor. For software-center I would like to add a option
(File/Remove with configuration). A alternative solution would be to
make purge the default and have a option File/Remove but preserve the
configuration). What do you think about what the default should be?
For most packages purge will be fine, its just the few ones where it
isn't that I'm concerned about.

For computer-janitor a plugin for packages that are removed but not
purged sounds appropriate. Combined with some intelligence about
detecting cases that a purge is harmless (like checking for purge as
a target on postrm and checking if the configuration file was actually
modified) we should get most packages right. With additional data like
looking at what date the package was removed we can get the remaining
ones right (i.e. if it was removed 3 month ago it probably is not
missed by the user).

Cheers,
 Michael



-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: software-center and remove vs. purge

2010-12-07 Thread Sebastien Bacher
On mar., 2010-12-07 at 10:13 +0100, Michael Vogt wrote:
 computer-janitor. For software-center I would like to add a option
 (File/Remove with configuration). A alternative solution would be to
 make purge the default and have a option File/Remove but preserve the
 configuration). What do you think about what the default should be? 

Hey Michael,

Being on the safe side by default seems to make sense, the issue then
would be to clean the configuration of things you removed later on. I'm
not sure the menu items are the best way because they are easy to miss
and you not have an obvious way to get back to them. 

What about having a uninstalled but with configuration left category?
It might not be useful enough to be a s-c category though, so what about
having a menu entry clean configuration for uninstall package which
would run the computer-janitor for you to do this task in this case
rather?

Cheers,
Sebastien Bacher


-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: software-center and remove vs. purge

2010-12-07 Thread Didier Roche
Le mardi 07 décembre 2010 à 15:27 +0100, Sebastien Bacher a écrit :
 On mar., 2010-12-07 at 10:13 +0100, Michael Vogt wrote:
  computer-janitor. For software-center I would like to add a option
  (File/Remove with configuration). A alternative solution would be to
  make purge the default and have a option File/Remove but preserve the
  configuration). What do you think about what the default should be? 

Hey Michael, Sebastien

 Being on the safe side by default seems to make sense, the issue then
 would be to clean the configuration of things you removed later on. I'm
 not sure the menu items are the best way because they are easy to miss
 and you not have an obvious way to get back to them. 

I completely second seb on that, being on the safe side by default seems
a sane thing.

Now about the removing cruft option…
 
 What about having a uninstalled but with configuration left category?

I'm not about that one, seems technical and reproduce what synaptic has.

 It might not be useful enough to be a s-c category though, so what about
 having a menu entry clean configuration for uninstall package which
 would run the computer-janitor for you to do this task in this case
 rather?

I would rather agree with that part of the proposal: just have this menu
entry to link to computer-janitor (or have a computer-janitor view in
software-center to get it more integrated) for those users rather a
technical category disconnected from the rest of removing cruft on my
system.

Cheers
Didier


-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: software-center and remove vs. purge

2010-12-07 Thread Martin Pitt
Hello Michael,

thanks for the nice summary!

Michael Vogt [2010-12-07 10:13 +0100]:
 Its difficult to tell programmatically what is going to happen when
 the maintainer script is called with purge as this is a shell
 script. Our tools can estimate what amount of data the configuration
 file was using (and even if the user ever modified it or not) but not
 what additional steps the maintainer script will take

I don't think it's that easy. You can only do that with conffiles, but
not with configuration files, or even data files in /var/lib (think
about PostgreSQL -- purging will take your entire database into the
void).

I don't think this behaviour would be entirely unexpected, though. If
you remove a database, then I don't think it's totally surprising
that this also cleans up your data, but as you say for those 1% it's
better to be safe than sorry.

 That being said I think we should make it easy for the user to access
 the purge functionality both inside software-center and
 computer-janitor.

I like that idea, too.

Thanks,

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop


Re: software-center and remove vs. purge

2010-12-07 Thread Andrew
On 07/12/10 16:10, Martin Pitt wrote:
 Hello Michael,
 
 thanks for the nice summary!
 
 Michael Vogt [2010-12-07 10:13 +0100]:
 Its difficult to tell programmatically what is going to happen when
 the maintainer script is called with purge as this is a shell
 script. Our tools can estimate what amount of data the configuration
 file was using (and even if the user ever modified it or not) but not
 what additional steps the maintainer script will take
 
 I don't think it's that easy. You can only do that with conffiles, but
 not with configuration files, or even data files in /var/lib (think
 about PostgreSQL -- purging will take your entire database into the
 void).
 
 I don't think this behaviour would be entirely unexpected, though. If
 you remove a database, then I don't think it's totally surprising
 that this also cleans up your data, but as you say for those 1% it's
 better to be safe than sorry.
 
 That being said I think we should make it easy for the user to access
 the purge functionality both inside software-center and
 computer-janitor.
 
 I like that idea, too.
 
 Thanks,
 
 Martin

Whilst the idea below has nothing to do with the technical side of
things, I wanted to show my idea for how it would be done in the GUI.

Here ( http://i53.tinypic.com/f437ma.png ) is a screenshot of my idea.
It is similiar to the widget for
Shuffle Control used in Banshee's toolbar.

If you click on the right of the button, it would offer a menu, to
select remove or purge. Then if you click on the left it would behave as
a button and do the action.

I am not proposing the wording I have used in the screenshot but rather
the way to go about it :)

-- 
Andrew


-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop