WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: The Extention System  (Read 2970 times)

nomer

  • Guest
The Extention System
« on: January 06, 2012, 08:38:51 PM »
There are still some parts of the way that application extensions are used by TinyCore Linux that I don't understand.

My Setup:
  /tce is on sdb2
  /boot/vmlinuz & /boot/tinycore.gz are on sdb2
  the system is started by grub4dos on the usb stick with these options: "quiet waitusb=10 tce=sdb2"
  mydata.tgz does exist, but I don't save at shutdown unless I really need to
So basically it is USB Stick boot mode.

Question 1: Is there any way to unload an OnDemand application that I've loaded?
  All loaded extentions seem to appear in /tmp/tcloop, whether they were loaded at boot time or later.

Question 2: Is there any way to remove applications without rebooting?
 
Question 3: Has the system changed from version to version?
  Have applications been "loaded" differently historically? Are there/have there been different ways of doing these things?

I hope that this isn't too many questions for one thread. If I've missed any documents answering these questions I'd be happy if you'd link me to them.
 
« Last Edit: January 06, 2012, 08:42:57 PM by nomer »

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: The Extention System
« Reply #1 on: January 06, 2012, 11:38:23 PM »
1 some unofficial script like this: http://forum.tinycorelinux.net/index.php/topic,5012.msg60561.html#msg60561

2 whitout reboot you remove by hand for mounted extension (in your case in sdb2) or automatic for not mounted

3 not that I know, but it would be comfortable for the future

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11502
Re: The Extention System
« Reply #2 on: January 07, 2012, 02:22:29 AM »
Hi nomer
While it is possible to remove extensions, it is impossible to do well without human intervention.
In order to remove an extension and it's dependencies, you have to be certain that nothing else
depends on them, and, that the extension and it's dependencies are not currently in use. Then there
is the more subtle problem of a standalone dependency that you wish to retain being removed. I once
had AppsAudit do that to me. Not because it did anything wrong, but because I did not intervene. While
I can't recall the extension, I can offer an example. Lets say you install cdrtools for burning CDs from
the command line. You then install xcdroast to add a GUI front end. Later you decide to remove
xcdroast because you find that the command line will suffice for your needs. Without human
intervention, cdrtools will be removed since it is a dependency of xcdroast.
By default, extensions are not really installed, they are mounted. The difference being they are not
copied to RAM. When sdb1 is mounted, your thumb drive is not copied to RAM, rather an access point
is created for it at /mnt/sdb1. The same applies to extensions, except that they all get mounted
at /tmp/tcloop. Extensions are really just a file containing a compressed read only file system that
when mounted become part of the directory tree. When extensions get mounted, links are created
that point to the files in the extension. For example, /usr/local/bin/cdrecord is a link that points to
/tmp/tcloop/usr/local/bin/cdrecord. On a somewhat related side note, an ISO file is a file containing
a read only file system. If you want to read a file from it, you don't need to burn a CD, you can create
a mount point, mount the ISO to it, and read from it like any other drive or directory.
Code: [Select]
sudo mkdir /mnt/somename
sudo mount -o loop filename.iso /mnt/somename
cd /mnt/somename
If you now enter  ls -la  you will get a directory listing.
Hope this long winded reply helps.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: The Extention System
« Reply #3 on: January 07, 2012, 04:17:44 AM »
Quote
Question 3: Has the system changed from version to version?

Absolutely, if you're interested in the details look in the 1.x and 2.x release threads. I think the current tcz concept was finalized in the 2.x series.
The only barriers that can stop you are the ones you create yourself.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: The Extention System
« Reply #4 on: January 08, 2012, 07:13:29 PM »
Quote
Question 3: Has the system changed from version to version?

Absolutely, if you're interested in the details look in the 1.x and 2.x release threads. I think the current tcz concept was finalized in the 2.x series.

Quote
3 not that I know, but it would be comfortable for the future

Epic Fail! I must have misunderstood  ;D

nomer

  • Guest
Re: The Extention System
« Reply #5 on: January 08, 2012, 10:09:52 PM »
Okay, so these questions have been largely answered.
  Question 3: answered
  Question 2: yes, if the extension isn't mounted and you mark it for deletion in apps-audit the extention will be deleted with out a reboot. (I want to be able to easily delete any question completely. see further down)
  Question 1: Technically, Yes. I can quickly un-mount an extension with "sudo umount /tmp/tcloop/<the program I'm trying to remove>"
    This is rather messy since it doesn't remove the symbolic links to the stuff in the extention. I think that I need to do some more looking around, particularly at the tcz-unload script. The ability to un-mount applications on the fly isn't important in its self because having some thing mounted doesn't take a lot resources. The important thing is the ability to completely remove the extension from persistent storage without reboot.
  Question 4: What exactly is 'tce-remove' for?
   The only documentation I've found is in the script itself:
Quote
Alllow removal of uninstalled (ondemand) extensions via tce-audit/appsaudit.
   
« Last Edit: January 08, 2012, 10:12:51 PM by nomer »