# What is the difference between "template" and "flavor"?



## Snurg (Dec 4, 2017)

I am having a hard time with the term "flavor", as I do not understand what is the difference between a "template" and a "flavor".
Are both the same thing?


----------



## tobik@ (Dec 4, 2017)

Help us understand too: What do you mean by "template" and why do you think it's the same as "flavor"?


----------



## Snurg (Dec 4, 2017)

For example, ezjail: there it looks like that there "flavors" actually mean a tailored standard configuration templates that can be copied from (instead from the default base).

And when I read about the lots of work the various Python releases do cause to you, and creating "flavors" of packages, I am not sure whether it is correct to think of "flavors" as templates or, say, build lists.
For each Python program different templates what to install, depending on which Python version is installed.

If I understand correctly, these were/are different packages, which will become "flavors" so that the user can easily search for and install the "examplepythonpkg" application he wants.
Instead of having a headache finding out what of "examplepythonpkg_py_1_5", "examplepythonpkg_py_3_8", "examplepythonpkg_py_9_3" etc is the correct package to install.

But, if my assumption is correct, wouldn't then "flavors" just mean different predefined _install templates_, i.e. dependency package lists, for "examplepythonpkg", which are being selected automatically by the package manager, depending which Pythin is available?

Hope this makes a bit clearer what confuses me.


----------



## DiscmanDaemon (Dec 7, 2017)

OK, so I think you are just getting a little confused by the reuse of the same term in different contexts. In the context of ezjail, a flavor is basically a means in which you can create a new jail that already contains the files from the selected flavor. There isnt really anything being installed when creating a new jail with an ezjail flavor. Rather, it is just copying the files you defined in the ezjail flavor directory into the chrooted filesystem. I wouldn't really call it a template though because it only defines files (although you can do a lot with this feature)

For example, if I have a flavor defined in /usr/jails/flavours/example/etc/resolv.conf and I use ezjails to create a new jail with ezjail-admin create -f example <some network config>, thew new jail will be created with the resolv.conf already in /etc/ in the jailed environment. However, there isn't really a way for me to "template" the jail to host networking (for example) with flavors. This has to be done from the host side.

Hope that helps


----------

