If I have understood how TC currently works with respect to .dep files, then if package A depends on package B, in A.dep I must not only specify package B but also what package format of the package to use (.tce, .tce, .tcel, ...).
True - The dep file for an extension should load all required files for the extension to work, which implies listing all related dependencies. At the moment, the dep file for a tce extension should contain tce extensions and the dep file for a tcz extension should contain tcz extensions
I see a couple of cons with the scheme above, among them are
1. Having to maintain two versions of the .dep file - one for tce repo and one for tcz repo
2. If the provider of package B suddenly decides to change from .tce to .tcel then all existing .dep files will be "broken"
3. If I have installed B.tcz and would like to install A.tce that has B.tce in its .dep file, that will fail. I do not think it should fail - or is there any reason for not supporting a mix of tce:s and tcz:s
4. In general the logical dependency are among packages and the actual physical dependency is in the files installed on the system. TCE:s and TCZ:s are just different ways to transport the data, and if a package is in format this or that should not really have an impact on what could/should be used.
1. - True, but not too big a deal
2. - True, but it shouldn't happen too often
3. - I don't think so - the logic is that tce-load checks if an extension is already loaded (tce or tcz) and skips the dependency if it is already loaded.
4. - see 3. above
I would like to propose the following scheme for use in TC. It adresses the issues mentioned above and is also backwards compatible with the current .dep files.
The scheme:
1. In general a .dep file contains a list of package names and not package file names, i.e. the extensions (tce, tcz, tcel, ...) are omitted from the packages listed in the .dep file.
2. It is however fully legal to include the extensions as today (for backwards compatibility and for some more precise control if so required
3. In case the extension is given, then TC only tries to install from package files having that exact extension
4. If no extension is given, TC tries to install from a package file having the same "repo type (e or z)" as the selected main package. The main package is the package the user selected to install.
5. If no extension is given and the package is already installed (in either file format) then just accept that it is already installed.
6. If and extension is given and a package is installed from a "wrong" file format, then I guess it would be best to refuse the install and issue some appropriate warning
For me:
1. OK
2. Not sure I understand
3. Not sure I understand
4. Makes sense for me
5. I believe that is already the case today
6. But why specify an extension type if we follow the logic of 4. above?
Of course this is only my opinion and I'm not the one to modify the script...