WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Updating tcz apps  (Read 47840 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Updating tcz apps
« on: May 28, 2009, 01:25:10 AM »
Allows reinstallation or download of tcz* or tce* extensions;  duplicate menu issues get fixed on reboot. (note: reinstallation overwrites the loop and tce.menu, so it only looks like there are two copies)
    
example with xonclock:
Code: [Select]
tc@box:~$ sudo rm /usr/local/tce.installed/xonclock

Appsbrowser will now reinstall/download      


« Last Edit: May 28, 2009, 10:22:47 PM by jpeters »

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: Updating tcz apps
« Reply #1 on: May 28, 2009, 11:32:58 AM »
close app and unmount
example unmounting xonclock.tcz:

Code: [Select]
@box:~$ sudo umount -d /tmp/tcloop/xonclock

Appsbrowser will now reinstall.    

I thought Jason had said there could be problems with this approach and that the  tcz-uninstall tool was the preferred way to perform a tcz update.
big pc man

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #2 on: May 28, 2009, 02:03:41 PM »
close app and unmount
example unmounting xonclock.tcz:

Code: [Select]
@box:~$ sudo umount -d /tmp/tcloop/xonclock

Appsbrowser will now reinstall.    

I thought Jason had said there could be problems with this approach and that the  tcz-uninstall tool was the preferred way to perform a tcz update.

I'm still testing it out.  I found a better way to get what I wanted, however, and edited the original post.
By removing /usr/local/tce.installed/app, I can download or reinstall both tce* and tcz* extensions
« Last Edit: May 28, 2009, 06:42:38 PM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #3 on: June 01, 2009, 02:57:03 AM »
After testing a while., this seems to work. Menus will adjust  after rebooting.  If saved as "update" run
"update app" without extension {eg, "update coreutils") .  Then use appsbrowser to reinstall.  Works for
both tce and tcz updates.
  
example....set path to your own tce/tcz directory:  
Code: [Select]
#!/bin/ash
sudo rm /usr/local/tce.installed/$1
[ -e /mnt/hda3/tcZ/${1} ]; then sudo rm /mnt/hda3/tcZ/${1}.* &>/dev/null
« Last Edit: June 01, 2009, 03:16:39 AM by jpeters »

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Updating tcz apps
« Reply #4 on: June 01, 2009, 02:12:49 PM »
Yes, it is probably better to use the tcz-uninstall tool since it will remove more things that may not be overwritten by loading another extension.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #5 on: June 01, 2009, 03:21:49 PM »
Yes, it is probably better to use the tcz-uninstall tool since it will remove more things that may not be overwritten by loading another extension.

We need a way to update tce as well as tcz.  From what I've tested, the tcloop gets overwritten, so the app seems to reinstall correctly.  This approach doesn't mess with the deps, which is just fine with me, and I would guess that configuration files are generated from within the program. An uninstall program that removes all the files doesn't exist. 
« Last Edit: June 01, 2009, 03:29:37 PM by jpeters »

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Updating tcz apps
« Reply #6 on: June 01, 2009, 03:41:51 PM »
tcloop is mounted. I was namely referring to the likelyhood of broken leftover links.

There is also tce-uninstall.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #7 on: June 01, 2009, 04:35:05 PM »
tcloop is mounted. I was namely referring to the likelyhood of broken leftover links.

There is also tce-uninstall.

I haven't had any problems, but I suppose worst case scenario is that someone could reboot.  

btw/ my primary interest is the ability to download updates into my tcz directory without first having to manually delete, reboot, and then reinstall. If the app happens to be something being used, like jwm.tcz, it's even more complicated.  With the update script, I can reinstall even if the app is running.        
 
« Last Edit: June 01, 2009, 05:17:20 PM by jpeters »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Updating tcz apps
« Reply #8 on: June 01, 2009, 06:09:35 PM »
Updating extensions really is as simple as using tcz/tce-uninstall to remove the app, and then reinstalling an updated version with the appbrowser or the command line.  Rebooting is not necessary (though always a choice), but uninstalling a window manager and using another one during the same session would of course require more than just the act of uninstalling one and installing another.  In that case rebooting to use the new WM would be the easiest for most.

Tce/tcz-uninstall does remove all the files that are contained in an extension.  Config files and directories that apps create in /home I believe should be left up to the user as whether to remove, never to be automated.  And temporary files created in /tmp and /var do no harm being left after an uninstall until next reboot.  Almost no package manager deals with such temporary files to my knowledge anyway.  But those files can be placed as empty writable files in the extension if their removal upon uninstall is important.  Or they could simply be manually deleted.

Whether one deletes an extension from the tce directory and reboots, or uninstalls the app is personal preference.  Both will get you there.  Of course, tcz's would ideally be unmounted before being deleted but that is of no issue if one is about to reboot anyway.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: Updating tcz apps
« Reply #9 on: June 01, 2009, 07:03:19 PM »
If the app happens to be something being used, like jwm.tcz, it's even more complicated.  With the update script, I can reinstall even if the app is running.         
Ah, if that's your primary concern, you could ask for that feature for tcz-uninstall.  Currently, it has an explicit check to halt on that scenario iirc.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #10 on: June 01, 2009, 07:11:27 PM »
I just used 'update tce-unstall' after

Code: [Select]
tc@box:/mnt/hda3/tcZ2$ tce-uninstall
Retrieving installation info. Please be patient.

I did wait the required 30 minutes.. :D

edit: The second download worked.  Glad I had "update" to get it, though  :)

Quote
Whether one deletes an extension from the tce directory and reboots, or uninstalls the app is personal preference.  Both will get you there.  Of course, tcz's would ideally be unmounted before being deleted but that is of no issue if one is about to reboot anyway.
I like to utilize the advantages of PPR to every extent possible, so will choose a two line script for something like updating. 

« Last Edit: June 01, 2009, 07:30:26 PM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #11 on: June 04, 2009, 04:15:05 AM »
"update" script with adapted  menu and wbar fixes from tcz-uninstall  Usage: "update APP" {eg, "update gnumeric" ); reinstall with appbrowser ( or add wget to script ).  


« Last Edit: December 08, 2009, 04:12:23 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #12 on: June 08, 2009, 06:39:02 AM »
"update" script with wget and tce-dir.  USAGE: "update APP" (eg, "update gnumeric").  note: scripts finds previously installed extension (eg, tce, tcel, tcz, etc.) & re-installs  [testing]

edit: found a simpler way finding APP  

« Last Edit: December 08, 2009, 04:11:56 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #13 on: June 08, 2009, 03:55:23 PM »
Added an exit, shortened some script, changed a few tests that weren't working correctly.  

edit: moved exit to better location in script.
« Last Edit: June 09, 2009, 04:25:20 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Updating tcz apps
« Reply #14 on: June 10, 2009, 03:49:34 AM »
Added fix for bug in tce-load script
« Last Edit: June 10, 2009, 04:36:20 AM by jpeters »