FS#11473 - Texlive-core/bin: pacman leaves files in /opt/texlive

Attached to Project: Pacman
Opened by Xyne (Xyne) - Saturday, 13 September 2008, 14:24 GMT
Last edited by Dan McGee (toofishes) - Saturday, 06 March 2010, 14:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The latest texlive-core pkg (texlive-core 2008.10429-1) now installs to /usr/ instead of /opt/.

After installation, the only files under /opt/texlive are pacsave files and a log file. These
should be removed /opt/texlive/ during this upgrade, moving any necessary files to the appropriate
location while doing so.

This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 06 March 2010, 14:59 GMT
Reason for closing:  Won't implement
Additional comments about closing:  See comments; it just doesn't seem safe enough or common enough to potentially screw things up.
Comment by Xyne (Xyne) - Saturday, 13 September 2008, 14:26 GMT
Gah, no edit button. "These should be removed /opt/texlive/ during this upgrade" should be "/opt/texlive/ should be removed during this upgrade".

Sorry.
Comment by Eric Belanger (Snowman) - Sunday, 14 September 2008, 22:44 GMT
pacman doesn't remove directories unless they are empty. You'll need to clean this up manually.
Comment by Xyne (Xyne) - Monday, 15 September 2008, 13:26 GMT
Right, and I already have.

The texlive package should remove directories from old installations and should not generate pacsave files in directories to which it does not install. I'm not sure if this is a pacman issue or a texlive-core issue (a matter of perspective I suppose), but in either case no package completely handled by pacman should leave files anywhere outside the home directory when uninstalled.

If the hierarchy was left because the folders were not empty but the only thing in them were pacsave files, it's obviously a pacman issue. If pacman tried to remove them (or checked if they were empty), it should be easy to make it spit out a "tried to remove /path/to/whatever/ but the directory was not empty" warning.
Comment by Eric Belanger (Snowman) - Monday, 15 September 2008, 17:00 GMT
What you are asking for is impossible. Pacman puts the pacsave in the same directory than the original file. That's the simplest way to do it. It doesn't figure out the new location, in fact I don't even know if it's possible. If the package is removed, it wouldn't make sense to move the pacsave in the new location. On package removal/update, pacman just notifies the user about these pacsave files. It's up to the user to check these files and to remove them if he no longer wants them.
Comment by Xyne (Xyne) - Friday, 19 September 2008, 02:48 GMT
Ok, but pacman is able to remove empty directories when uninstalling a package, right? That means that it checks if the directory is empty when trying to remove it (or maybe it checks every directory in the path and removes every empty one when uninstalling package files).

Would it really be that hard then for it to check if the only file in the directory is a .pacsave file and to display a message without removing the .pacsave file and directory?
E.g. ===>Warning: /path/to/dir/ only contains .pacsave files

Also, just to clarify my tone, it's not "zomfg why can't joo do this!!!!1111", it's "hey, hidden clutter sucks, is there a better way to handle this?". I just don't like the idea that pacman forgets about files and folders that it's created. An alternative would be to keep track of pacsave files somewhere other than the log, but I don't know how much overhead that would lead to, so I leave that as a fleeting thought.
Comment by Roman Kyrylych (Romashka) - Sunday, 28 September 2008, 17:09 GMT
IMO the reason to change current behaviour is too small to justify making things more complicate.
Comment by Roman Kyrylych (Romashka) - Sunday, 28 September 2008, 17:10 GMT
moved to Pacman project as it is more appropriate
Comment by Dan McGee (toofishes) - Saturday, 01 November 2008, 01:10 GMT
Doesn't it tell you it is creating a pacsave file? I think that is more than enough here.

As soon as you start mucking with the normal process and deleting files you shouldn't, you are bound to mess up. I'd rather not royally screw someones system over.
Comment by Allan McRae (Allan) - Saturday, 06 March 2010, 09:56 GMT
I recommend closing this as this is a case of being a feature rather than a bug.
Comment by Dan McGee (toofishes) - Saturday, 06 March 2010, 14:58 GMT
Since this isn't the normal case, a pre-install/post-install combo would be suited to helping the user in this case, so I think I agree with Allan.

Loading...