WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Alternative dependencies  (Read 3027 times)

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Alternative dependencies
« on: October 04, 2010, 04: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
« Last Edit: October 21, 2010, 10:06:33 AM by uggla »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Alternative dependencies
« Reply #1 on: October 04, 2010, 04: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.   ;)
« Last Edit: October 21, 2010, 07:53:13 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14567
Re: Alternative dapendencies
« Reply #2 on: October 04, 2010, 06:29:11 AM »
I'd suggest to use the latest - python-2.7.tcz

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Alternative dapendencies
« Reply #3 on: October 04, 2010, 12: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

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Alternative dependencies
« Reply #4 on: October 04, 2010, 12:26:54 PM »
No, dep files serve (non interactive) automatisation.
« Last Edit: October 21, 2010, 07:53:31 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Alternative dapendencies
« Reply #5 on: October 04, 2010, 01: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.

Offline andriscom

  • Newbie
  • *
  • Posts: 32
Re: Alternative dapendencies
« Reply #6 on: October 21, 2010, 01:42:33 AM »
I think this would be a good thing!  :)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Alternative dapendencies
« Reply #7 on: October 21, 2010, 07:24:35 AM »
What if the next package requires the second dependency in that list, and the two are incompatible?

Frank

  • Guest
Re: Alternative dapendencies
« Reply #8 on: October 21, 2010, 09:31:27 AM »
Then you are in exactly the same situation as now, where the list comprises only the first dependency.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Alternative dapendencies
« Reply #9 on: October 21, 2010, 09:53:00 AM »
uggla,

have you - or has anyone else reading this - ever seen such a solution implemented?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1218
Re: Alternative dapendencies
« Reply #10 on: October 21, 2010, 09:56:34 AM »
Write it into the info file and let the user decide which package to install...

Offline uggla

  • Sr. Member
  • ****
  • Posts: 438
Re: Alternative dapendencies
« Reply #11 on: October 21, 2010, 10:06:03 AM »
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.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1218
Re: Alternative dependencies
« Reply #12 on: October 21, 2010, 12: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...