Wait, but this works now on tank with cookiso. Only local iso creating is broken.
We need universal tool working on any SliTaz, as well on Tank or local host.
Tazlito has several issues you may not see at the first look:
“upgrade-flavor” and “pack-flavor” updated the (estimated) sizes in the flavor description file in the wrong way: it calculated only the “unpacked” sizes of only packages being in the list (without their dependencies) and multiplied this size to ⅔ to guess “packed” size.
“base” flavor packages list contains 29 packages, but Tazlito will install 52 packages (listed packages + their dependencies). Estimated sizes should be close to real sizes you can see after ISO is produced.
Mirrors are ignored in these calculations. Imagine, you created your own flavor with your own packages in your own mirror (like me).
Using mirrors was a broken topic in the Tazlito. Now it set up to use several mirrors with few conditions and priorities:
- /home/slitaz/packages of the Host machine (if it exists). Here we can find all the fresh packages (on Tank) or user created packages (on local host). The highest priority.
- Repo defined in the variable PACKAGES_REPOSITORY in the tazlito.conf. It may or may not equal the previous repo (on the Tank the both are equal /home/slitaz/packages, on my host PACKAGES_REPOSITORY=/home/slitaz/cooking/packages). The high priority.
- All the repositories listed in the “mirrors” in the flavor. Normal priority.
- Regular “main mirror”. The low priority.
Tazlito was collected packages in the PACKAGES_REPOSITORY. Only packages listed in the packages.list (remember 29 packages of 52 for “base”). It may be taken from the TazPkg cache (why?) or repacked from the current system, or downloaded from the “main” mirror. In the case of Tank: the only “listed packages” was taken from Tank fresh packages repo, all other dependencies was not controlled by Tazlito and we have several “hacks” to force TazPkg to not download them from a “regular mirror”.
Now packages not preloaded, they all directly installed using TazPkg with root= and properly settings inside the chroot: Tazpkg knows better how to operate it's cache and how to search package in the multiple repositories.
Next, “packed flavors” use the packages lists including packages names with the versions. You know, versions are useless (as yesterday I added package to the TazPanel dependencies and version not changed because sources not changed). Now Tazlito strips (and not used) versions in the lists.
Tazlito has unclear (maybe only for me) documentation. I can't remember (shame on me) all it's commands and why we need them. I started to write man pages based on the existing documentation: tazlito(1), tazlito.conf(5) and flavor(5).
Tazlito now is big script: 80 KB of code, more than 2,900 lines, more than 50 functions(). I consider to break it on easy-to-understand small independent modules, like TazPkg. Like Linux-way: make the only one job, but make it perfect.