Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: Arslan S. on June 19, 2010, 06:02:38 PM

Title: empty.tcz bug ?
Post by: Arslan S. on June 19, 2010, 06:02:38 PM
well i can't decide wheter this is really a bug or maybe empty tcz shouldn't be allowed

but when you load an empty extension a symlink in root directory of filesystem is created:  "*" to "/tmp/tcloop/extname/*"

i have first discovered this for compiletc.tcz then created an empty test extension to verify it

tc 3.0a7
Title: Re: empty.tcz bug ?
Post by: robc on July 01, 2010, 10:37:10 AM
I see this too when compiletc is loaded. Adding the /usr/local/tce.installed/compiletc file should fix this.
Title: Re: empty.tcz bug ?
Post by: Jason W on July 01, 2010, 10:57:10 AM
Yeah, including a single file to an empty meta extension would be the best way to go I think, like the /usr/local/tce.installed/compiletc mentioned.
Title: Re: empty.tcz bug ?
Post by: robc on October 29, 2010, 01:18:10 PM
This bug is still present for compiletc.

Perhaps a test in the extension audit script to make sure the extension is not empty? If it is empty, recreate it with /usr/local/tce.installed/extensionname.
Title: Re: empty.tcz bug ?
Post by: Jason W on October 29, 2010, 01:26:16 PM
I think it is reasonable for a test for an empty .tcz and recreating it with /usr/local/tce.installed/extname if found as empty.  I am not at my box, but I will look and make sure a non-executable tce.installed entry present in extensions won't cause issue.  I will add it to the audit routine as a .tcz should have at least one file in it.
Title: Re: empty.tcz bug ?
Post by: robc on October 29, 2010, 01:58:51 PM
the file could be an empty executable to avoid throwing errors
Title: Re: empty.tcz bug ?
Post by: Jason W on October 29, 2010, 02:02:50 PM
Actually, the audit script already checks for tce.installed file and if there sets it to 755 perms if not already.  But perhaps better not to have an empty executable. 

Maybe better to add an empty file /usr/local/share/extname/extname so as to not interfere with tce.installed, as that is a common place for extension files to be copied to system and such.

Title: Re: empty.tcz bug ?
Post by: maro on October 29, 2010, 05:36:52 PM
I can't see any harm in using an "empty executable" like '/usr/local/tce.installed/extension' as the following little test seems to proof (at least to myself):
Code: [Select]
tc@box:~$ touch x
tc@box:~$ chmod 755 x
tc@box:~$ ls -l x
-rwxr-xr-x    1 tc       staff            0 Oct 29 20:39 x
tc@box:~$ ./x
tc@box:~$ echo $?
0
Title: Re: empty.tcz bug ?
Post by: SvOlli on October 29, 2010, 07:35:30 PM
Why not create a symlink to /bin/true?
Title: Re: empty.tcz bug ?
Post by: Jason W on October 29, 2010, 09:36:08 PM
Actually, just creating an empty directory will suffice for not creating the * symlink.  Perhaps the /usr directory can be created in these empty extensions to save having to deal with /usr/local/tce.installed, and this way no new files are created to take up inodes.
Title: Re: empty.tcz bug ?
Post by: hiro on February 21, 2011, 10:13:35 AM
What's the current state of this?
I don't understand the whole code, has anything been decided for the future?
Title: Re: empty.tcz bug ?
Post by: curaga on February 21, 2011, 12:27:00 PM
The current code umounts an empty extension, thus saving one loop and in fact making an empty extension preferable to a dummy file/dir.

Whether the /* file still appears I'm not sure.
Title: Re: empty.tcz bug ?
Post by: Rich on February 21, 2011, 12:45:25 PM
Hi curaga
I installed compiletc on January 15,2011 and /* still appears.
Title: Re: empty.tcz bug ?
Post by: tinypoodle on February 21, 2011, 01:01:00 PM
/* can also appear with incomplete/corrupt downloads (e.g. with Appbrowser).
Title: Re: empty.tcz bug ?
Post by: hiro on February 22, 2011, 07:32:38 AM
Thanks :)
*/
Title: Re: empty.tcz bug ?
Post by: roberts on February 22, 2011, 09:42:58 PM
I will look into this when I return from Scale9x.
Title: Re: empty.tcz bug ?
Post by: Arslan S. on February 23, 2011, 04:55:08 AM
empty extensions are called meta extensions, in the case of a meta extension i put a single file in it as a workaround

see kdemultimedia.tcz for example
Title: Re: empty.tcz bug ?
Post by: hiro on February 23, 2011, 10:01:17 AM
in fact making an empty extension preferable to a dummy file/dir.
Don't put that file in there, Arslan.
Title: Re: empty.tcz bug ?
Post by: ioannis on February 20, 2013, 02:55:01 PM
So i guess using usr is the final way of creating an empty tcz ?

original-modules-3.0.21-tinycore.tcz is a completely empty tcz (no files or folders in filesystem) which reports error on mount
Has anyone run submitqc4 on all extensions in the library to ensure consistency of application ?

Also in tce-load line#148 calling sudo umount could fix the umount error reported on empty extensions...