WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tce uninstall?  (Read 16875 times)

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
tce uninstall?
« on: January 10, 2009, 01:39:03 AM »
Has there been any discussions about a tce uninstall package or script?

I think this is possible (except for maybe in packages that overwrite base files). There is already a file generated in tce.installed so tc knows which extensions are installed. This file can be used to store a list of files contained by the tce. This list can be used to remove the files (and possibly repack them into a tce extension).

This would be useful for those with limited RAM so they can remove extensions that they are not currently using to install another extension that they need to use temporarily. Or if you want a compile environment with compiletc but don't need it later then you can remove it.

Does this sound doable or something that may be desired?
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: tce uninstall?
« Reply #1 on: January 10, 2009, 03:13:50 AM »
It is doable, but tcz's may be more suitable for your situation?

I think this is the same scenrio with .dsl 'uninstalls'...

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: tce uninstall?
« Reply #2 on: January 10, 2009, 09:49:49 AM »
Our solution for limited ram systems is to use tcz type extensions. There is a tcz-uninstall.
tce load into ram, trying to implement a full package management system also in ram would further reduce available ram. While TC supports limited persistency it is not the focus.
10+ Years Contributing to Linux Open Source Projects.

Offline florian

  • Full Member
  • ***
  • Posts: 116
    • Home Page
Re: tce uninstall?
« Reply #3 on: January 13, 2009, 12:26:54 PM »
maybe it could then be done as an extension? (like the tcz-uninstall one)

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: tce uninstall?
« Reply #4 on: January 13, 2009, 02:20:32 PM »
maybe it could then be done as an extension? (like the tcz-uninstall one)

yeah, but the real issue is that you "uninstall" a tcz by unmounting a loop, possibly deleting a file or two. to uninstall a tce, you'd have to delete many files and folders, and tce is not even designed with this in mind. it wouldn't be impossible to rig some utility as an extension to try to do this, but it's messy, where doing it with tcz is simple and natural.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: tce uninstall?
« Reply #5 on: January 13, 2009, 03:40:43 PM »
I think it also removes the symlinks that were generated during tce-load.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tce uninstall?
« Reply #6 on: January 13, 2009, 05:00:58 PM »
Like Robert has said, package management beyond installing extensions with their dependencies does not fit in with TC's goals.  Though rebooting into a clean known state is the correct way to rid your system of unwanted extensions and other stuff, I have to admit I occasionally have wanted to be able to uninstall a .tce extension and have toyed with the idea.  A file for each extension that contains a list of the files installed by that extension would make it possible to write a routine that uninstalls tce's.  But there are two things I can think of right now that tcz-uninstall takes into account that cannot be done with tce's. 

For one thing tcz's never overwrite base system files unless those files are contained in a user.tar.gz.  That is by design and is a safety measure.  And the files in the user.tar.gz are not removed during uninstall since they are real files that may be overwriting files in the base system and are therefore not wise to remove.  So uninstalling a tcz is pretty safe and has almost no chance of messing up the base system.  One of the good things about a tce is it installs by force, overwriting anything in it's path.  That is valuable especially for extensions that need to overwrite base items, but makes uninstalling such an extension not a good idea.  It can break the system.

Another thing is it is possible to tell if a tcz extension is in use and in that case the uninstaller exits.  There is no way to tell if the files in a .tce are in use, at least not that I know of.  So if a .tce is uninstalled, one may be removing files that are in use.  Again, not a good thing.

These two reasons alone make uninstalling a tce a risky proposition.


Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: tce uninstall?
« Reply #7 on: January 13, 2009, 06:17:24 PM »
What I would like is not a tce uninstall,but a routine that deletes all the uneeded tce/z
dCore user

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: tce uninstall?
« Reply #8 on: January 13, 2009, 08:28:21 PM »
What I would like is not a tce uninstall,but a routine that deletes all the uneeded tce/z

where are the unneeded tce's? as far as i know tc deletes them anyway, unless you are using the tce= boot option (which you only do if you want to keep them.) there are no unneeded tcz's, as they are mounted until you use tcz-uninstall.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: tce uninstall?
« Reply #9 on: January 13, 2009, 10:24:47 PM »
Quote
So if a .tce is uninstalled, one may be removing files that are in use.
I agree there is a level of risk that a user may try to remove files that are in use, though it is the user that is removing these extensions and they should know what they are using and what they are not. In the end it is the users responsibility to know what is and isn't being used on their system. I would never put out a package like this without a warning/disclaimer that says it should be used at their own risk and they need to understand what they are removing.

Quote
A file for each extension that contains a list of the files installed by that extension
This was I originally proposed in the first post...but you can also generate a file list from the .tce package itself. So an uninstall package designed for tces could require the actual tce package (i.e. compiletc.tce) be present in the user's tce/ directory. If that is done then the only packages that can be uninstalled would be those that are already installed AND have the package present in tce/.

Quote
Our solution for limited ram systems is to use tcz type extensions.
I am not questioning any decisions of the TC staff. I am only curious if this is a possibility or if there is even a desire for such a tool.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tce uninstall?
« Reply #10 on: January 14, 2009, 06:25:29 AM »
To satisfy my curiosity, I adjusted my local tce-load and tc-config to create a list of files for each extension loaded in a manner that does not increase load time to see what the cost in RAM would be.  The bad news is that for the 44 extensions I have loaded, their list files occupy 200kb of space which would be in RAM if one were not using tclocal. 

I have to admit that for my own use being able to uninstall tce's is kind of neat, but it wouldn't be fair to cost everyone in RAM usage to have this feature since it would require a change to the extension load routine in base to make use of an extension to uninstall tce's.  If it could be done solely in the context of an add-on extension that would be different.

It is one of those things that could be done but not without a cost to one of TC's central goals.  As well as the risks mentioned that would exist uninstalling certain extensions.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: tce uninstall?
« Reply #11 on: January 14, 2009, 08:50:39 AM »
suppose tce-load checks if [ -f ]; . . . /usr/bin/tce-uninstall and tce-path-from-boot-option/tce-uninstall.tce. if either one exists, it will create the logs. i say either one because tce-load also loads on boot, so unless tce-uninstall.tce opens first, /usr/bin/tce-uninstall won't exist yet.

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: tce uninstall?
« Reply #12 on: January 14, 2009, 12:23:25 PM »
Quote
I have to admit that for my own use being able to uninstall tce's is kind of neat, but it wouldn't be fair to cost everyone in RAM usage to have this feature since it would require a change to the extension load routine in base to make use of an extension to uninstall tce's.  If it could be done solely in the context of an add-on extension that would be different.
The base routine to install extensions does not have to change. Instead the tce-uninstall package would create its own temporary list of files from the extension itself and when it is finished removing the files it would then remove the temporary list that it created. Though that would mean this extension would only be useful to those who have the package downloaded onto their system, or it could grab the extension from the repository itself.

Quote
suppose tce-load checks if [ -f ];
I agree with Jason that the base system should not have to be changed....after all, that is what extensions are for.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: tce uninstall?
« Reply #13 on: January 14, 2009, 05:30:01 PM »
I agree with Jason that the base system should not have to be changed....after all, that is what extensions are for.

me too, but it's easier to write a simple extension if one line of code is added, and it would not do anything at all unless /usr/bin/tce-uninstall or tce-folder-from-boot-code/tce-uninstall.tce were found, in which case tce-load would run a script that was part of the extension.

it's possible to do it in an even more convoluted way that doesn't require 1 line of support in tc. you could have the extension itself replace tce-load with a modified tce-load. i doubt roberts would prefer tce-load be replaced by an extension. plus this has the problem i mentioned of it only applies after stored tce's are loaded on boot.

if anything it assumes that someone really wants to create tce-uninstall, which most people probably wouldn't if they knew why. but adding one line to tcb is probably the easiest and most efficient way to support it.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tce uninstall?
« Reply #14 on: January 14, 2009, 05:37:44 PM »
One of the things that has always bothered me about uninstall programs is that they leave behind all the junk that was created by the parent program. Files that end up in /home or perhaps in the backup file.  It sure would be nice to have a "running" list of all the files that are associated with any installed program or some sort of "scanner" that could provide the list.
big pc man