ElkArte Community

Elk Development => Feature Discussion => Exterminated Features => Topic started by: emanuele on October 06, 2013, 10:36:06 am

Title: Addons packages from github
Post by: emanuele on October 06, 2013, 10:36:06 am
Two things at the moment:
1) https/http, I can't download from the https, but it may simply be my localhost misconfigured...
2) the folder inside the package that doesn't like to the package amanger

Do you think we can do something about it?
Title: Re: Addons packages from github
Post by: Spuds on October 06, 2013, 01:28:37 pm
LOL .. it took me a few mins to even find the download page ... I did not know it moved under package servers  O:-)   Now to test!

Quote1) https/http, I can't download from the https, but it may simply be my localhost misconfigured...
Its not you, its getPackageInfo
Code: [Select]
if (strpos($gzfilename, 'http://') !== false)
Change it to this will allow the download
Code: [Select]
if (preg_match('~^https?://~i', $gzfilename) === 1)
Title: Re: Addons packages from github
Post by: Spuds on October 06, 2013, 01:57:04 pm
Quote2) the folder inside the package that doesn't like to the package amanger
Hummm... I was just testing and it seems to unpack the nested folder just fine, I can list files and it gives me the OK to install (tried from github and bitbucket) ... the problem I'm seeing is they are all called master so when you download the another it overwrites the previous.
Title: Re: Addons packages from github
Post by: emanuele on October 06, 2013, 02:52:51 pm
Strange: if I click "install" directly from the download I get the error, if instead I go to the packages list and use that install it works... ???

/me smells bug
Title: Re: Addons packages from github
Post by: Spuds on October 06, 2013, 03:18:33 pm
Sounds like a bug for sure ... how do you want to handle the master.zip thing ...

We could use the name in the link (after we check for it being github or bitbucket and the file being master.zip) and rename the file to that.  Problem is that the link name does not necessary change for updates so would overwrite the older with the latest.  We could also check for the comment in the zip and use the hash as well as the name, that would be unique at least.

thoughts?
Title: Re: Addons packages from github
Post by: emanuele on October 06, 2013, 03:55:46 pm
Gooood question.
The mod name from the url looks good.
For the rest it could even simply be a _1, _2, _3 and so on depending on the download order.
Not elegant, but be easy (and also maybe more readable for users looking at their ftp that don't have to figure out the connection between the hash and the version of the mod).

...well...maybe at that point it would also be nice to "remember" the url...dunno.
Title: Re: Addons packages from github
Post by: Spuds on October 06, 2013, 04:42:13 pm
The _1 _2 _3 makes a lot more sense in that respect, could even use the hash to see it it changed to signal the +1, or not :P  ... so now the other question, who wants to do the code ... whats that? oh you do, well OK  ;D  O:-)
Title: Re: Addons packages from github
Post by: emanuele on October 06, 2013, 04:45:20 pm
/me thinks Spuds was elected Master of PacMan a while ago. :P
Title: Re: Addons packages from github
Post by: emanuele on December 08, 2013, 04:08:16 am
And the Master of PacMan has implemented that a while ago.

And also for that reason, I think the distinction between  package manager and package server is not so relevant to be worth another menu...

Also, thinking while writing, maybe we should let the mod specify (at install-time) an url where they can check for updates, so that a scheduled task can retrieve the info and notify the admin... 1.1, right? O:-)
Title: Re: Addons packages from github
Post by: Spuds on December 08, 2013, 12:38:25 pm
I think we should re-combine the package / server menus back together ... The code separation is fine but I still find the menu separation a bit of a bother vs a help (after using it for some time now)

Yeah did the master thingy a while ago, for addons that dont use tagged releases

The url thing could be interesting, not sure how it will work, but 1.1 for sure !