Bug 32112 - Windows uninstaller: LibreOffice folder not deleted
Summary: Windows uninstaller: LibreOffice folder not deleted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
3.3.0 Beta3
Hardware: Other Windows (All)
: medium normal
Assignee: Andras Timar
URL:
Whiteboard:
Keywords:
: 45013 45079 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-05 08:43 UTC by Cesare Leonardi
Modified: 2013-12-18 20:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cesare Leonardi 2010-12-05 08:43:00 UTC
If i uninstall LibreOffice Beta3 this folder is left on the disk:
%LO%\share\uno_packages\cache\uno_packages\

Where %LO% is the setup path, normally under %programfiles%.

Tested on Windows 2000 Pro SP4 italian, with the default LO installer, no extension.

Cesare.
Comment 1 Rainer Bielefeld Retired 2010-12-05 10:26:42 UTC
I very often have seen that behaviour with remaining paths from other programs, and there might be good reasons for it. 

On my PC that folder is empty, so there would not be any reason to leave it, but currently I do not want to test what will happen when I uninstall.

Why do you believe that that is a real bug?
Comment 2 Cesare Leonardi 2010-12-05 14:26:09 UTC
On 12/05/2010 07:26 PM, bugzilla-daemon@freedesktop.org wrote:
> --- Comment #1 from Rainer Bielefeld<LibreOffice@bielefeldundbuss.de>  2010-12-05 10:26:42 PST ---
> I very often have seen that behaviour with remaining paths from other programs,
> and there might be good reasons for it.

Yes, Windows applications are famous for being unpolite and leaving your 
pc dirty after uninstall. :-)

I think that a well-behaved application should remove everything from 
its folder under %programfiles% when the user choose that he doesn't 
want that application anymore. The only sensible exceptions i see in a 
program like LibreOffice are extensions, so that in case of upgrade or 
reinstall the user has not to reinstall them also. In that case would be 
useful a checkbox in the uninstall program that, if checked, will purge 
everything from %programfiles%, including extensions.
Clearly if the user hasn't installed extensions (like in this bug 
report) there are no reason to leave files under %programfiles%.

Clearly i see this as a low priority bug and you are free to consider 
this not a bug and close it.

Cesare.
Comment 3 Larsen 2011-06-10 00:52:23 UTC
I would also say that it´s a (small) bug and noticed this behaviour with LO 3.3 and 3.4 on a Win XP SP3 German.
Comment 4 Rainer Bielefeld Retired 2011-06-10 01:37:06 UTC
<http://wiki.documentfoundation.org/BugReport_Details#Version>!

There might be some reason for not deleting program folder, for example .dll Extensions simply added by copying the .dll into the addons folder. But I believe a deletion after "Do you want to delete ..." question would be a useful enhancement.
Comment 5 Larsen 2011-06-10 01:42:11 UTC
Agreed.

The normally used way is to keep a folder if there are (e.g. manually copied) files in it, and to delete it (without asking) if it´s empty.
Comment 6 Andras Timar 2011-11-23 07:50:04 UTC
With my commit today, %LO%\share\uno_packages\cache\uno_packages will be removed during uninstall.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=92181d3e510fb0ef09d5688cc0eade4ad2743f76

But that's not all. I need to patch the installer code to remove *.pyc files from the Python subdirectories. I'll add the corresponding entries to RemoveFile table of MSI.
Comment 7 Andras Timar 2011-11-24 14:05:21 UTC
(In reply to comment #6)

> But that's not all. I need to patch the installer code to remove *.pyc files
> from the Python subdirectories. I'll add the corresponding entries to
> RemoveFile table of MSI.

I changed my mind. How lame it is that Program Files\LibreOffice folder is writable by the user. It should not be writable. This happens only when someone uses his/her desktop with an Administrator account, especially under Windows XP. This is not recommended. 

When the user does not have right to write into the program's folder, then *.pyc files are not generated, so in the normal case uninstaller does not have to remove them. 

I consider that this bug is fixed by the commit mentioned above.
Comment 8 Andras Timar 2012-01-25 10:18:11 UTC
*** Bug 45079 has been marked as a duplicate of this bug. ***
Comment 9 Andras Timar 2012-01-25 10:20:22 UTC
*** Bug 45013 has been marked as a duplicate of this bug. ***
Comment 10 Pedro 2012-01-25 10:40:16 UTC
> I changed my mind. How lame it is that Program Files\LibreOffice folder is
> writable by the user. It should not be writable. This happens only when someone
> uses his/her desktop with an Administrator account, especially under Windows
> XP. This is not recommended. 
> 
> When the user does not have right to write into the program's folder, then
> *.pyc files are not generated, so in the normal case uninstaller does not have
> to remove them. 
> 
> I consider that this bug is fixed by the commit mentioned above.

ALL Windows XP computers for personal use (and in particular laptops, netbooks, etc) have the default user as Admin. Windows users don't expect to have special tasks that require a password.

Your reasoning is: since the OS allows LO, it is the OS fault that LO does it.

IMO it is still LO's fault if it is writing to a folder that is not supposed to. 

Why can't these files *always* be stored in the user's personal folder?
Comment 11 Pedro 2013-06-21 11:20:34 UTC
*** Bug 56563 has been marked as a duplicate of this bug. ***
Comment 12 Pedro 2013-06-21 11:21:10 UTC
This bug has never been solved. My PC is accumulating leftover folders (LibreOffice 3.6 and  LibreOffice 4.0 because I manually deleted the previous...)

The most recent update (from 4.0.3.3 to 4.1.0.1) left a 35.6Mb folder containing Fonts.

Regardless of Andras' opinion I still think this is not expected (unless Admins are not ALLOWED to use LibreOffice...)
Comment 13 Andras Timar 2013-06-21 12:02:01 UTC
Pedro, why did you reopen a 1.5 years old bug? It is very confusing. For LibreOffice 3.x the bug was properly fixed. There is a rule in installer that removes the *.pyc files.

Unfortunately Python 3 in LibreOffice 4.x puts  *.pyc files in a subfolder, so the the removing rule does not work, but it is a different issue from the technical point of view.

Also, I don't understand the problem with fonts. Fonts go to a system folder, not to LibreOffice'd folder. And we don't uninstall fonts, because they cannot be properly refcounted.
Comment 14 Pedro 2013-06-21 14:46:40 UTC
(In reply to comment #13)
> Pedro, why did you reopen a 1.5 years old bug? It is very confusing. For
> LibreOffice 3.x the bug was properly fixed. There is a rule in installer
> that removes the *.pyc files.

IF the Admin does NOT use LO AND/OR does NOT install extensions for all users, then all files are removed. In any case I NEVER managed to have a clean uninstall (even if the Admin does not use or add any extensions) where the install folder and/or some subfolders are ALL removed...
 
> Unfortunately Python 3 in LibreOffice 4.x puts  *.pyc files in a subfolder,
> so the the removing rule does not work, but it is a different issue from the
> technical point of view.

Ok. So that is another bug.

> Also, I don't understand the problem with fonts. Fonts go to a system
> folder, not to LibreOffice'd folder. And we don't uninstall fonts, because
> they cannot be properly refcounted.

My mistake. These were not installed fonts. These were the leftovers of a parallel install. Apologies for that.
Comment 15 gekacheka 2013-08-03 16:03:34 UTC
Bug 67717 filed for the LibreOffice 4 cpython-33 pycache problem.

(In reply to comment #13)
> Pedro, why did you reopen a 1.5 years old bug? It is very confusing. For
> LibreOffice 3.x the bug was properly fixed. There is a rule in installer
> that removes the *.pyc files.
> 
> Unfortunately Python 3 in LibreOffice 4.x puts  *.pyc files in a subfolder,
> so the the removing rule does not work, but it is a different issue from the
> technical point of view.
Comment 16 retired 2013-12-18 20:01:12 UTC
First: this bug is old and has been filed against LO 3.3beta3.

Second: there have been fixes going on.

So Pedro, if LO 4.2b2 still shows behavior which leaves folders or other stuff on the system, could you please create a new bug which addresses, which exact files are left over and we'll look into that.

The initial complain about the uno_packages folder has been resolved. I think this is all good. Let's start with clean new reports if uninstall is not to your liking and go from there.