WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: script that generates .tree files  (Read 253 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1823
script that generates .tree files
« on: April 02, 2026, 09:48:09 AM »
Would one of the developers be able to please share the script that generates the .tree files on the official repo? While I could reimplement it myself, I'm trying to some save time and energy.

P.S. When submitting new extensions for the official repo, I sometimes also have to create and submit build dependencies. Being able to generate the .tree files of all of these new extensions on my local mirror--before submitting anything--would be useful to me. For example, tce-size, which depends on the .tree files, gives valuable information that can help me decide if an extension is too bloated to be worth using/submitting.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1823
Re: script that generates .tree files
« Reply #1 on: April 02, 2026, 10:36:01 AM »
I found the script in one of my own posts ::)
https://forum.tinycorelinux.net/index.php/topic,26040.msg168124.html#msg168124

When I use the  deptree  script with the  -d  flag, the output exactly matches the .tree format.

Sorry for the noise.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1529
Re: script that generates .tree files
« Reply #2 on: April 02, 2026, 05:42:59 PM »
We use a C program now, most of the recent changes has been in circular dependency monitoring, so it doesn’t fill up the disk space.  But otherwise it doesn’t do much more that the shell script.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1823
Re: script that generates .tree files
« Reply #3 on: April 02, 2026, 06:35:45 PM »
Hi Paul_123. May I please have a copy of the C program? I'd prefer it over the shell script.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1529
Re: script that generates .tree files
« Reply #4 on: April 03, 2026, 08:14:24 AM »
sure,...  I'll get it for you.  next time I can login to the repo server.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1823
Re: script that generates .tree files
« Reply #5 on: April 03, 2026, 08:30:13 AM »
Thank you :)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1529
Re: script that generates .tree files
« Reply #6 on: April 03, 2026, 06:24:58 PM »
Sorry,  its cpp.  here you go.  I also included the script that calls treegen.
« Last Edit: April 03, 2026, 08:00:53 PM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12667
Re: script that generates .tree files
« Reply #7 on: April 03, 2026, 08:03:48 PM »
Hi GNUser
I modified the attached  gen_tcz_trees_17.x  file so the path
on the server would not be exposed.

You'll need to modify this to match your system if you want to run it:
Code: [Select]
cd $REPO || exit 1
There are also lines that call out the kernel version for TC17.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1823
Re: script that generates .tree files
« Reply #8 on: April 03, 2026, 08:06:37 PM »
Thank you very much, Paul_123. I'm in your debt.

Got it, Rich. Thanks.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1823
Re: script that generates .tree files
« Reply #9 on: April 03, 2026, 08:45:42 PM »
I did a little test. Not surprisingly, the cpp version is over 500x faster than the shell script!

Code: [Select]
$ time sh -c "for i in labwc-config labwc-dev labwc-menu-generator labwc sfwbar foot appindicator-broker dino; do treegen $i $(uname -r) >$i.tcz.tree; done"
real 0m 0.03s
user 0m 0.01s
sys 0m 0.00s

$ time sh -c "for i in labwc-config labwc-dev labwc-menu-generator labwc sfwbar foot appindicator-broker dino; do deptree -d $i >$i.tcz.tree; done"
real 0m 16.11s
user 0m 11.03s
sys 0m 4.37s