WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tcz-uninstall.tce - does it have the -f option  (Read 13831 times)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #15 on: May 22, 2009, 08:01:08 PM »
The umount is right, but manually umounting a tcz directory in /tmp/tcloop is well outside the normal use of tcz's.  I will put a check in there that will use different test cases that will take manual umounting into consideration.  I also see a potential bug that can be fixed in the dialog creation.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #16 on: May 22, 2009, 08:31:24 PM »
The /tmp/tcloop direcory being mounted is the crucial info for whether an extension is installed as a tcz.  /usr/local/tce.installed does  not provide that info.  Umounting the /tmp/tcloop/appname directory is essentially breaking the tcz extension install.  The files (symlinks) that are removed from the system are determined by reading that directory.  And to place further checks in the script that would act in the absence of the /tmp/tcloop/appname directory mount would jeopardize installed tce extensions. 

However, using a lazy umount does the same trick as the --force uninstall of the tce-uninstall.  I can "umount -l /tmp/tcloop/emelfm2" and still use the emelfm2 binary running in ram, it does not kill the process just makes the app unable to relaunch.  That I can live with. 

I will add a --force option.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #17 on: May 23, 2009, 07:43:02 AM »
Jason I just tried the most recently posted tcz-uninstall.tce and the command line worked. I did kill the app process before the uninstall. So that is good news - thanks for the effort.

There is a message that pops out:

Xlib:  extension "Generic Event Extension" missing on display ":0.0".

Any idea what causes this?

Edit: I just noticed that after the uninstall completes the tcz-uninstall menu still shows the tcz that was just uninstalled but if it is selected it reports that the tcz is not found.
« Last Edit: May 23, 2009, 08:13:43 AM by bigpcman »
big pc man

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14625
Re: tcz-uninstall.tce - does it have the -f option
« Reply #18 on: May 23, 2009, 08:03:37 AM »
Something to do with the location of rgb.txt maybe?

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #19 on: May 23, 2009, 09:56:58 AM »
The Xlib error shows with a lot of apps when issued from the terminal, wbar I believe is the one that shows it here when being restarted.

I am in the middle of some more improvements since I uploaded the last update.  The --force option will be included, some more bugfixes including the tcz-uninstall menu issue just mentioned. 

I am still debating on whether to add dependency handling.  If it does not slow things down too much, then I will add it in.  Tce-uninstall can be miserably slow due to the manner in which it checks for files in use and fetching list files, but tcz-uninstall can obtain the same info on extensions in a small fraction of the time since it has to retrieve nothing and only has to check if mountpoints are being used, not individual files.  So no slowdown should occur by adding dep handling, I will test it and see.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #20 on: May 23, 2009, 10:33:24 AM »
My strong personal preference would be to include the dependencies in the uninstall since I always uninstall tcz apps when I'm done using them and it's a pain to have to hunt done all the dependencies in the menu.

I assume if there is more than one app using the dep than you would not remove it.
« Last Edit: May 23, 2009, 10:42:26 AM by bigpcman »
big pc man

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #21 on: May 23, 2009, 07:48:06 PM »
Just uploaded a fixed tcz-uninstall, and from what I can see the issues have been corrected.  The --force option is also available.

I will add dependency handling in time.  I just don't have the time right now it will require, but maybe in the coming weeks.  

EDIT: Upon remembering, to deal with dependent apps requires downloading the .dep files for each extension installed that has one.  That is part of what makes tce-uninstall so slow at least with first usage, but the .list files have to be downloaded for tce-uninstall for it to function so fetching the dep files does not detract as much from tce-uninstall.  Tce-uninstall is made for PPI usage anyway, so that downloading of list and dep files only happens once.  But it would ruin the tcz-uninstall experience as the dep files would have to be downloaded again after every boot.  I will leave dep handling out of it to preserve the simple and fast usage of this utility. 
« Last Edit: May 23, 2009, 08:49:30 PM by Jason W »

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #22 on: May 24, 2009, 07:05:25 AM »
Jason thank you for all the work on tcz-uninstall. I'm testing it out now.


So far everything looks great. There is just one small problem.
I installed samba which installs cups as a dependency to test out the uninstall tool.  After uninstalling both samba and cups the cups app still shows up in the desktop menu. A screen refresh does not help. It's gone from wbar so that part worked. However, the following cups files are still present. As near as I can tell there is no cups process running. Also a few of samba files are left behind.

./etc/cups
./etc/cups/cupsd.conf
./etc/cups/cupsd.conf.default
./etc/init.d/cups
./usr/local/share/doc/cups
./usr/local/share/cups
./usr/local/include/cups
./usr/local/tce.flwm/cups
./usr/local/lib/cups

./etc/samba/smb.conf
./etc/samba/private/smbpasswd
./etc/samba/private/secrets.tdb
./var/run/nmbd.pid
« Last Edit: May 24, 2009, 07:18:50 AM by bigpcman »
big pc man

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #23 on: May 24, 2009, 08:54:18 AM »
I will get to the flwm menu entries in time, it will require some awk scripting basically reversing the flwm_makemenu function.

The files you mention are the user.tar.gz files that are left over after uninstall.  That is by design as those are real files and depending on the extension maker they may be critical system files that get overwritten.  Therefore by default they are not deleted.  But I have added the deletion of those files to the --force option since --force always implies risk.  I also added a --purge command line function that allows the removal the the tcz and relaged files in the tcz directory.  That way one can uninstall a tcz and then use the appbrowser to install a newer version without issue.  There is also a dialog when the menu is used that asks if one wants the files in the tce directory deleted.  A --help option is also added.  Basically:

tcz-uninstall                      brings up menu
tcz-uninstall --help            echoes help contents
tcz-uninstall appname       uninstalls appname.tcz
tcz-uninstall appname --force       force uninstalls appname.tcz
tcz-uninstall appname --purge      uninstalls appname.tcz and it's files in the tce directory+
tcz-uninstall appname --force --purge         Combines --force and --purge, their order is not important.


Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: tcz-uninstall.tce - does it have the -f option
« Reply #24 on: May 24, 2009, 09:53:54 AM »
This brings up some interesting issues regarding automatic functions in general. The beauty of PPR is that I can just delete the file from my tcz folder, and problem solved.  I can look at the dep list to choose other files I want to delete (it always helps to understand what they are)  Automatic functions like not being allowed to download an app because it's already installed are a nuisance  for the reason you stated, although the primary reason why I would need yet another automatic function such as tcz-unstall......so that I will be "allowed" to download an update.  Of course, I'll have to wait for tce-uninstall to extend the privilege to tce apps. 

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #25 on: May 24, 2009, 12:02:49 PM »
Jason I tried the tcz-uninstall again on samba and cups using the --force and --purge options. The results are exactly the same. All the same files remain present. Also I should note that samba must be killed (smbd and nmbd) before the uninstall tool is used or it won't work.

On the cups uninstall there are error messages:
sed: /usr/local/tce.menu/menu: no such file or directory
rm: can not remove '/user.tar.gz': no such file or directory

I'm a little confused about the cups menu entry removal problems  since I don't have a lot of experience messing around with flwm. But all I did was remove cups from /home/tc/.wmx/Applications and restarted  flwm and cups was gone. So I don't understand this:

Quote
I will get to the flwm menu entries in time, it will require some awk scripting basically reversing the flwm_makemenu function.

edit: By the way the --force and --purge options are excellent ideas!

« Last Edit: May 24, 2009, 12:31:37 PM by bigpcman »
big pc man

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #26 on: May 24, 2009, 12:46:16 PM »
The flwm menu files in .wmx/Applications are not necessarily the same as the extension name, it can be any name that the extension maker wants in the menu.  It is derived from entries in /usr/local/tce.menu/extensionname, it is not just the simple scripted removal of a file based on extension name as that file can have any name.  It will take scripting to check for a couple of variables in the /usr/local/tce.menu/extensionname, Menu first then Program. 

I tested cups with --force and the files were deleted, the directories remained.  The directories remain as you do not want to remove /usr, /etc, and the like, which is what will happen if the extension maker includes base directories in the user.tar.gz.  I will test this more.

"sed: /usr/local/tce.menu/menu: no such file or directory" means you don't have a /usr/local/tce.menu/menu file, that file is supposed to be there, at least last I checked.  If not, a test for the file can occur.

"rm: can not remove '/user.tar.gz': no such file or directory" happens because the user.tar.gz is not symlinked into the filesystem.  That is cosmetic and can be fixed.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #27 on: May 24, 2009, 01:35:52 PM »
I see your point on the flwm menu app removal. That will take some work.

Ok so after the uninstall of cups all this stuff will remain by design. Is that correct?


Code: [Select]
tc@box:~$ sudo killall smbd
tc@box:~$ sudo killall nmbd
tc@box:~$ tcz-uninstall cups --force
sed: /usr/local/tce.menu/menu: No such file or directory
rm: cannot remove '/user.tar.gz': No such file or directory
cups has been uninstalled.
tc@box:~$ Xlib:  extension "Generic Event Extension" missing on display ":0.0".
tc@box:~$ cd /
tc@box:/$ sudo find . -name "*cups*"
./etc/cups
./etc/cups/cupsd.conf
./etc/cups/cupsd.conf.default
./etc/init.d/cups
./usr/local/share/doc/cups (help/   images/)
./usr/local/share/cups (banners/   charmaps/  charsets/  data/      drivers/   fonts/     model/     templates/)
./usr/local/include/cups
./usr/local/tce.flwm/cups
./usr/local/lib/cups (backend/  cgi-bin/  daemon/   filter/   monitor/  notifier/)
tc@box:/$
« Last Edit: May 24, 2009, 01:49:37 PM by bigpcman »
big pc man

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #28 on: May 24, 2009, 05:59:21 PM »
Directories created by the installation of the tcz or the user.tar.tz are supposed to remain, removing empty directories created by the install of the tcz could be done.  I will consider it as it does make sense. 

I will check into why the files are left behind when using the --force option.  I will not have much time with TC this week so it may take a while.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #29 on: May 24, 2009, 06:23:06 PM »
Directories created by the installation of the tcz or the user.tar.tz are supposed to remain, removing empty directories created by the install of the tcz could be done.  I will consider it as it does make sense. 

I will check into why the files are left behind when using the --force option.  I will not have much time with TC this week so it may take a while.

Jason you are doing a great job! Thanks again for all your effort. Tcz-uninstall has been substantially improved. I look forward to your future improvements as they become available.
big pc man