Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: uggla on October 04, 2010, 07:50:41 AM

Title: Alternative dependencies
Post by: uggla on October 04, 2010, 07:50:41 AM
Hi!

I have created an extension which requires Python >2.4. That means that a whole bunch of different Python extensions in the repo would work. Is it possible to add python*.tcz or something similar to the .dep-file?

regards
/Uggla
Title: Re: Alternative dependencies
Post by: tinypoodle on October 04, 2010, 07:59:32 AM
Perhaps http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/3.x/tcz/edna.tcz.info could serve as an example of precedence of a possible approach to this subject.   ;)
Title: Re: Alternative dapendencies
Post by: Juanito on October 04, 2010, 09:29:11 AM
I'd suggest to use the latest - python-2.7.tcz
Title: Re: Alternative dapendencies
Post by: uggla on October 04, 2010, 03:05:39 PM
Wouldn't it be a good idea if you could give alternatives on a line in the dep-file?
For example like this:
python.tcz|python-2.7.tcz|python-2.5.2

/Uggla
Title: Re: Alternative dependencies
Post by: tinypoodle on October 04, 2010, 03:26:54 PM
No, dep files serve (non interactive) automatisation.
Title: Re: Alternative dapendencies
Post by: uggla on October 04, 2010, 04:27:59 PM
No, dep files serve (non interactive) automatisation.
Why couldn't it still be?

When loading an extension it could try to load each of the dependencies in the list and move on to the next line as soon as it succeeds.

When installing an extension the presence of any of the alternatives should be checked and if none is found then install the first one.
Title: Re: Alternative dapendencies
Post by: andriscom on October 21, 2010, 04:42:33 AM
I think this would be a good thing!  :)
Title: Re: Alternative dapendencies
Post by: gerald_clark on October 21, 2010, 10:24:35 AM
What if the next package requires the second dependency in that list, and the two are incompatible?
Title: Re: Alternative dapendencies
Post by: Frank on October 21, 2010, 12:31:27 PM
Then you are in exactly the same situation as now, where the list comprises only the first dependency.
Title: Re: Alternative dapendencies
Post by: tinypoodle on October 21, 2010, 12:53:00 PM
uggla,

have you - or has anyone else reading this - ever seen such a solution implemented?
Title: Re: Alternative dapendencies
Post by: hiro on October 21, 2010, 12:56:34 PM
Write it into the info file and let the user decide which package to install...
Title: Re: Alternative dapendencies
Post by: uggla on October 21, 2010, 01:06:03 PM
uggla,

have you - or has anyone else reading this - ever seen such a solution implemented?

Not really, but I think rpm can handle alternative dependencies.
Title: Re: Alternative dependencies
Post by: hiro on October 21, 2010, 03:27:10 PM
I admit that I once also had been fighting against the feeling of needing this feature.
But thinking about how to implement it I also understood why it doesn't work on any other system either...