[Qgis-developer] Plugins repository

Alex Mandel tech_dev at wildintellect.com
Sat Jan 22 20:53:27 EST 2011


On 01/22/2011 03:26 PM, Alessandro Pasotti wrote:
> 2011/1/22 Gary Sherman <gsherman at geoapt.com>
> 
>> On 1/22/11 8:57 AM, Alessandro Pasotti wrote:
>>
>>> 2011/1/22 Gary Sherman <gsherman at geoapt.com <mailto:gsherman at geoapt.com>>
>>>
>>>
>>>    On 1/22/11 1:25 AM, Alessandro Pasotti wrote:
>>>
>>>        2011/1/22 Paolo Cavallini <cavallini at faunalia.it
>>>        <mailto:cavallini at faunalia.it>
>>>        <mailto:cavallini at faunalia.it <mailto:cavallini at faunalia.it>>>
>>>
>>>
>>>
>>>            Il giorno ven, 21/01/2011 alle 19.37 +0100, Alessandro
>>>        Pasotti ha
>>>            scritto:
>>>
>>>         > The missing piece was the authentication bridge with OSGEO.
>>>
>>>            AFAIK this is now working. If so, what prevents us from setting
>>>            everything in place?
>>>            All the best.
>>>
>>>
>>>
>>>        I'was able to login with my osgeo credentials but I couldn't
>>>        upload a
>>>        plugin: it fails with permission denied on the folder where the
>>>        plugin
>>>        files should reside.
>>>
>>>        Somebody with root access to the server should fix it.
>>>
>>>        [Errno 13] Permission denied:
>>>        '********************/qgis/static/packages'
>>>
>>>    The validation of plugin packages doesn't work properly for all
>>>    packages. My plugin that uploads and validates find on the "old" repo
>>>    (pyqgis.org <http://pyqgis.org>) fails on the new site:
>>>
>>>
>>>    File upload must be a valid QGIS Python plugin compressed archive.
>>>    Cannot find __init__.py in the compressed package: this does not
>>>    seems a valid plugin (I searched for pluginbuilder/Makefile__init__.py)
>>>
>>>    Looks like it is munging things together that shouldn't be....
>>>
>>>
>>>
> 
> Your plugin loads without errors on my dev environment (I cannot reproduce
> the issue).
> 
> I will try on the server tomorrow.
> 
> In the meantime, I've opened a project on redmine for the django site.
> 

It appears that relying on the 1st item in the zip to always be
packagename.zip just isn't 100% reliable. My metaedit plugin fails that
test in python but is clearly formatted correctly when extracted or
downloaded by qgis. I did test in python by hand too and metaedit/ isn't
in the namelist at all for some reason even though the folder is there
when the package is extracted.

Here are some possible ways to change the validator
namelist[0].split('/') to grab whatever is before the /
or package.split('.') to grab the name of the zip minus the ext
- There are several other ways to do this in python with the os and path
modules, or slicing. The nice part about package.split is that you could
save both the packagename and ext to test if the ext is zip

packagename,ext = package.split('.')

Thanks,
Alex


More information about the Qgis-developer mailing list