WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: best approach to metapackages?  (Read 2704 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
best approach to metapackages?
« 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?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: best approach to metapackages?
« Reply #1 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.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
Re: best approach to metapackages?
« Reply #2 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"

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: best approach to metapackages?
« Reply #3 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.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
Re: best approach to metapackages?
« Reply #4 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
« Last Edit: January 02, 2020, 07:55:00 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: best approach to metapackages?
« Reply #5 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?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
Re: best approach to metapackages?
« Reply #6 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

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
Re: best approach to metapackages?
« Reply #7 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
« Last Edit: January 02, 2020, 07:52:50 PM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: best approach to metapackages?
« Reply #8 on: January 02, 2020, 07:55:48 PM »
Hi GNUser
Done. :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
Re: best approach to metapackages?
« Reply #9 on: January 02, 2020, 08:12:48 PM »
Thank you :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1494
Re: best approach to metapackages?
« Reply #10 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.