WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
tcz-uninstall.tce - does it have the -f option
« on: May 21, 2009, 09:22:32 AM »
Does tcz-uninstall.tce have the -f option that allows a command line uninstall of a single tcz app?
big pc man

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #1 on: May 21, 2009, 09:58:14 AM »
Yes, "tce-uninstall --force pango" would uninstall firefox without any regard to files above /usr/local, whether the extension is in use, or whether there are apps installed that depend on pango.  I will add that to the info file.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #2 on: May 21, 2009, 10:20:45 AM »
Yes, "tce-uninstall --force pango" would uninstall firefox without any regard to files above /usr/local, whether the extension is in use, or whether there are apps installed that depend on pango.  I will add that to the info file.
I presume you mean "tcz-uninstall".
big pc man

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #3 on: May 21, 2009, 11:01:31 AM »
Yes, "tce-uninstall --force pango" would uninstall firefox without any regard to files above /usr/local, whether the extension is in use, or whether there are apps installed that depend on pango.  I will add that to the info file.

I just tried  "tcz-uninstall --force tightvnc" as well as "tcz-uninstall --force tightvnc.tcz" and get the menu in both cases.

The menu works great. However I get the following message:
 Xlib:  extension "Generic Event Extension" missing on display ":0.0".
--------------------------------------------------------------------------------------------------
edit: I just tried  "tcz-uninstall --force tightvnc &"  in a script and got the following results:

Code: [Select]
rm: cannot remove '/user.tar.gz': No such file or directory
bash has been uninstalled.
Xlib:  extension "Generic Event Extension" missing on display ":0.0".

In this case tightvnc had already been removed so it looks like the uninstall automatically picked up the first tcz on the menu (bash) and uninstalled it. Yikes - that's not good!
---------------------------------------------------------------------------------------------------
edit 2: I just tried  "tcz-uninstall  &" in a script and got the same above results.
« Last Edit: May 21, 2009, 11:43:29 AM by bigpcman »
big pc man

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #4 on: May 21, 2009, 11:42:33 AM »
My bad, I thought we were talking about tce-uninstall.  I misread.

I will look at tcz-uninstall when I get home.  I cannot remember if there is a --force option to it as it is not needed, tcz-uninstall does not need a force option as it's only check is if the extension's files are in use.  You would not want to uninstall an extension in use anyway, but I will see if I can't fix the scenario you described.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #5 on: May 21, 2009, 01:23:14 PM »
My bad, I thought we were talking about tce-uninstall.  I misread.

I will look at tcz-uninstall when I get home.  I cannot remember if there is a --force option to it as it is not needed, tcz-uninstall does not need a force option as it's only check is if the extension's files are in use.  You would not want to uninstall an extension in use anyway, but I will see if I can't fix the scenario you described.

Actually all I am looking for is a way to uninstall a named tcz app from within a script.
big pc man

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #6 on: May 21, 2009, 02:56:13 PM »
"tcz-uninstall firefox" should but I will check more tonight as I haven't looked at tcz-uninstall in a while.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #7 on: May 22, 2009, 09:59:26 AM »
"tcz-uninstall firefox" should but I will check more tonight as I haven't looked at tcz-uninstall in a while.
Hello Jason,
Did you get a chance to look at the tcz-uninstall script. I double checked and got the same results. For instance tcz-uninstall emelfm2 brings up the menu and does not remove the program. Also, just to confirm how the script works, it looks like all dependent tczs have to uninstalled one by one.
big pc man

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #8 on: May 22, 2009, 10:26:03 AM »
No, I didn't get a chance.  Dealing with extension submissions is what I place as first priority, and on occasion takes it all my available time.  But I will check into it when I can, hopefully tonight. 

As for dealing with dependencies, I personally prefer simplicity but I may work dep handling in one day.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #9 on: May 22, 2009, 12:56:40 PM »
Jason there appears to be three issues I have run into with the tcz-uninstall script.
1. If a tcz name is given on the command line the menu still comes up and the tcz is not uninstalled.
2. If a tcz name is given on the command line and its not in the menu weird things happen.
3. The flwm menu is not updated after a tcz is uninstalled.
big pc man

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #10 on: May 22, 2009, 01:34:06 PM »
Now that jwm is not the only window manager there will have to be some adjustment to tcz-uninstall and tce-uninstall.  As well as the bugs you mentioned, which those should be an easy fix.  Thanks for the feedback, a test case for which wm is running should enable proper menu updating.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #11 on: May 22, 2009, 09:26:50 PM »
I fixed the command line issues you mentioned, but the window manager menu handling is still in development for 2.x so there is no need to spend much time on it now when details may change.  I will work up a routine that will accommodate the various window managers after release.  Also, a --force option is not going to work as the tcz will not be unmounted by umount if it is still in use.  The extension must not be in use for tcz-uninstall to work, dictated by the umount command.  So tcz-uninstall is of little value in scripts, just as a user utility.

Thanks for reporting on these issues.

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #12 on: May 22, 2009, 09:36:00 PM »
I fixed the command line issues you mentioned, but the window manager menu handling is still in development for 2.x so there is no need to spend much time on it now when details may change.

The extension must not be in use for tcz-uninstall to work, dictated by the umount command.  So tcz-uninstall is of little value in scripts, just as a user utility.

How about if the script kills the app process, does a umount on the tcz and then an uninstall of the tcz?
big pc man

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: tcz-uninstall.tce - does it have the -f option
« Reply #13 on: May 22, 2009, 09:44:38 PM »
That is definitely doable, though potentially causing unexpected results of apps being killed and lost data.  Though the "--force" name does imply just that.  The tce-uninstall's version of --force does not kill any apps, just deletes their files so they could not be relaunched.  Killing apps may be a bit much, let me sleep on it. 

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: tcz-uninstall.tce - does it have the -f option
« Reply #14 on: May 22, 2009, 10:15:41 PM »
Jason I just tried the kill, umount and uninstall for tightvnc. Do I have the umount right?

Code: [Select]
tc@box:/$ sudo umount /tmp/tcloop/tightvnc
tc@box:/$ tcz-uninstall tightvnc
tightvnc is still in use and will not be uninstalled.
« Last Edit: May 22, 2009, 10:19:01 PM by bigpcman »
big pc man