Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: GNUser on January 02, 2020, 07:28:37 AM

Title: best approach to metapackages?
Post by: GNUser on January 02, 2020, 07:28:37 AM
I'd like to create a metapackage foo.tcz whose sole purpose is to load the "dependencies" listed in foo.tcz.dep.
foo.tcz would be listed in tce/onboot.lst
foo.tcz.dep would exist in tce/optional/

Just two quick questions about foo.tcz:
1. Does it have to exist at all, or is it sufficient for foo.tcz.dep to exist in tce/optional/?
2. If it does have to exist (in tce/optional/), is it okay for it to be a totally empty file?
Title: Re: best approach to metapackages?
Post by: Rich on January 02, 2020, 08:22:37 AM
Hi GNUser
I'm pretty sure  foo.tcz  has to exist.

Looking inside the  compiletc.tcz  meta extension it contains:
Code: [Select]
/usr/local/share/compiletc/files/READMEwhich contains the text:
Code: [Select]
This is is a meta-extension for a compile environmentHey look, I found a bug. Someone typed  is  twice in a row. ;D

The  original-modules-4.19.10-tinycore.tcz  meta extension just contains an empty  /lib  directory.
Title: Re: best approach to metapackages?
Post by: GNUser on January 02, 2020, 08:44:08 AM
Thanks, Rich. You're amazingly helpful, as always.

- I can confirm that if foo.tcz does not exist, dependencies in foo.tcz.dep don't get loaded.
- Interestingly, foo.tcz can be a completely empty file and it still works.
- That's quite the severe bug you found ;)

I look forward to trying Pure64 11.0 and helping in whatever little ways I can.

Cheers,
Bruno "GNUser"
Title: Re: best approach to metapackages?
Post by: Rich on January 02, 2020, 01:29:56 PM
Hi GNUser
... - Interestingly, foo.tcz can be a completely empty file and it still works. ...
That's not surprising. The first thing that happens is the dependencies get resolved and loaded. Even if  tce-load  errors out on  foo.tcz
it won't matter since it's processed last. The only side effect I see under those circumstances is  foo  won't show up in  tce.installed.
Title: Re: best approach to metapackages?
Post by: GNUser on January 02, 2020, 02:13:34 PM
I just did some tests with empty foo.tcz "metapackage" to load extensions in foo.tcz.dep. This is what I discovered after booting:

- foo shows up in output of tce-status -i
- An empty /usr/local/tce.installed/foo exists
- /tmp/tcloop/foo (an empty directory) exists

So there seem to be no cons to using an empty foo.tcz

    [EDIT]: Corrected the  tce.installed  line as requested.  Rich
Title: Re: best approach to metapackages?
Post by: Rich on January 02, 2020, 04:49:25 PM
Hi GNUser
I just did some tests with empty foo.tcz ...
Did you  touch foo.tcz  or use  mksquashfs  to create an empty squash file?
Title: Re: best approach to metapackages?
Post by: GNUser on January 02, 2020, 07:49:08 PM
Sorry, I should have clarified. The empty foo.tcz was created with
Code: [Select]
touch foo.tcz
Title: Re: best approach to metapackages?
Post by: GNUser on January 02, 2020, 07:51:16 PM
Rich, would you kindly correct Reply #4? Second bullet point has an extraneous .tcz. I should have written the following:
- An empty /usr/local/tce.installed/foo exists
Title: Re: best approach to metapackages?
Post by: Rich on January 02, 2020, 07:55:48 PM
Hi GNUser
Done. :)
Title: Re: best approach to metapackages?
Post by: GNUser on January 02, 2020, 08:12:48 PM
Thank you :)
Title: Re: best approach to metapackages?
Post by: GNUser on February 11, 2020, 02:20:16 PM
BTW, using a completely empty extension created with touch foo.tcz causes a benign (but unsightly) error during boot when the showapps boot command is used. It has something to do with the fact that the empty extension cannot be mounted.

I guess the best approach is to create a package with a single dummy file, similar to compiletc.tcz's approach.