Must 009-caches.xzm loaded as last module when booting?

Technical issues/questions of an intermediate or advanced nature.
User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Must 009-caches.xzm loaded as last module when booting?

Post#1 by Rava » 30 Oct 2021, 07:32

System 5.0rc x86-64
Since I load some extra modules I get the "creating caches" (or whatever it is precisely called) at bootup and have to wait for the caches to be created each time I boot.
So I ran cache-module as root from the virtual terminal and copied the module 009-caches.xzm into $PORTDIR/base/ … but at next bootup it still complained about new modules and created the caches.

Must the caches module be loaded as last module?
Currently my numbered named modules go up to 992- - 992-rootcopy_5.0rc3c-RECENT.xzm - but I also load two modules that are of my non-numbered kind of optional / extra modules:
fbreader-0.12.10-x86_64-2ponce.xzm
fbreader-0.99.2_deps_qt-4.8.4STRIPPED+liblinebreak-2.1--x86_64.rava.xzm

I presume when the caches module needs to be loaded as last module, with my setup I can rename it e.g. into zzz-caches.xzm

Would that do the trick?

I looked into the code of /sbin/cache-module but nothing is explained there about a possible need for the caches module to be loaded last.

If there is a need of it to be loaded last, please add a text at the end after creating the module like so (meant as a suggestion for the end of the cache-module script)

Code: Select all

du -sh /tmp/009-caches.xzm
echo 'If your setup has non-standard named modules, you probably have to rename 009-caches.xzm to ensure it is loaded last.
Copy the /tmp/009-caches.xzm into your $PORTDIR/base/ and check via "ls $PORTDIR/base/*.xzm" if your caches module is listed as last module. Rename it e.g. as 999-caches.xzm, zzz-caches.xzm or ZZZ-caches.xzm'
Cave! The above code suggestion for echo 'Info text' will break lines mid-word. I once found a solution to ensure text output via terminal is broken for new line at whitespace only, but alas! I lost that code and up to now was not able to find it again. :( (And I am too lazy to reinvent the wheel once more and come up with a working solution myself) Image
Cheers!
Yours Rava