WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tce-load improvements  (Read 8075 times)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: tce-load improvements
« Reply #15 on: June 03, 2011, 02:14:26 PM »
How about multiple lines in /opt/tcemirrors that are searched in order to resolve missing deps.
That handles a static case, but not a dynamic one. If I make a .tcz available via my webserver, it'll be a one-time download for the most part. Being able to simply execute
tce-load -wi http://mysite.com/myext.tcz
is useful. Executing
MIRROR=http://mysite.com tce-load -wi myext.tcz
is less intuitive, but would still work.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: tce-load improvements
« Reply #16 on: June 03, 2011, 02:43:42 PM »
For a depless extension, why not wget http://mysite.com/ext.tcz && tce-load -i ext.tcz?
The only barriers that can stop you are the ones you create yourself.

Offline cosmin_ap

  • Newbie
  • *
  • Posts: 48
Re: tce-load improvements
« Reply #17 on: June 03, 2011, 03:04:25 PM »
It isn't quite so simple if you have dependencies. Right now, dependencies must exist in the same location as the extension being loaded.
I don't see how this couldn't work with URLs too, i.e. get .dep and .md5.txt from the same base URL as the tcz, same with dependencies, and fallback to the default mirror in /opt/tcemirror. Actually, I don't see why it shouldn't try all the mirrors like eg. debian does. They could even be tried in parallel.

For a depless extension, why not wget http://mysite.com/ext.tcz && tce-load -i ext.tcz?
wget http://mysite.com/ext.tcz -cP "$(cat /opt/.tce_dir)/optional" && tce-load -i ext.tcz would bring it closer, still, why everyone is so eager to post workarounds to the initial proposals fails me. I mean we all get a small adrenaline rush at solving little problems like that and all, but this way tinycore would have no features at all, it would be just this forum full of little scripts and solutions :)


Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: tce-load improvements
« Reply #18 on: June 03, 2011, 03:15:07 PM »
Quote
I don't see how this couldn't work with URLs too, i.e. get .dep and .md5.txt from the same base URL as the tcz, same with dependencies, and fallback to the default mirror in /opt/tcemirror.

So, when loading an extension, check for dependencies in:
1) Same location as extension
2) Directory indicated by /opt/.tce_dir
3) Mirror (or mirrors) as specified in /opt/tcemirror

That would suit me fine.