Bug report #6506

Missed icons after package update

Added by Alexander Bruy about 12 years ago. Updated about 12 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:-
Pull Request or Patch supplied:No

Description

Icons for some plugins are broken, for example see at Statist plugin here http://plugins.qgis.org/plugins/?sort=downloads

Don't know why this happens, icons are presented in packages and correctly listed both in _init.py and metadata.txt. I notices this after updating existing package without changing version number.

statist.zip (24.5 KB) Alexander Bruy, 2012-10-16 09:38 AM

History

#1 Updated by Alessandro Pasotti about 12 years ago

Can you please tell me exactly what you did?

The icon was there before you uploaded a new version?
There is more than one way to update a version, can you please explain better what happened?

I see just one version, did you delete the old version before uploading a new one?

Please also attach the zip file which caused the problem.

#2 Updated by Alessandro Pasotti about 12 years ago

I noticed that the icon is missing from most of your plugins, try to remove spaces after the equal sign in metadata.txt

According to the specifications of the INI format, all chars after the equal sign are part of the value, this means that

icon = icon.png

yelds

" icon.png"

which of course does not exists.

metadata.txt takes precedence over metadata in init.py (which is now deprecated).

If this was the reason of your problem, please close this ticket.

#3 Updated by Alexander Bruy about 12 years ago

Alessandro Pasotti wrote:

Can you please tell me exactly what you did?

I renamed authorName metadata entry to author and add email entry (both in init.py and metadata.txt). Then create new package and upload it using "Edit" link in plugin page (version number was unchanged). Package uploaded without any errors, but icon disappear.

I've tried now your suggestion about removing spaces around equal sign but this didn't help. Also I checked, and seems all previous packages have spaces around equal sign and this works fine for icons. For example look at CSWClient plugin http://plugins.qgis.org/plugins/cswclient/version/0.0.12/

#4 Updated by Alessandro Pasotti about 12 years ago

Please attach the package.

Also note that authorName has been deprecated in favour of "author" (as in metadata.txt), see the specs:

https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/docs/metadata.rst

#5 Updated by Alexander Bruy about 12 years ago

Alessandro Pasotti wrote:

Please attach the package.

Attached

Also note that authorName has been deprecated in favour of "author" (as in metadata.txt), see the specs:

https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/docs/metadata.rst

That's why I've started to update metadata in all plugins. As I said in previous comment, I rename deprecated "authorName" to "author" and also add new metadata entry "email"

#6 Updated by Alessandro Pasotti about 12 years ago

Ok, the problem is that the icon is in a subdirectory, I'll work on that.

In the meantime, you can update the icon moving in the main folder of the package.

#7 Updated by Alessandro Pasotti about 12 years ago

Forget it, it's a problem when a version is updated, it doesn't happen if you use the "Share a plugin" button.

#8 Updated by Alessandro Pasotti about 12 years ago

  • Status changed from Open to Resolved

Please check.

#9 Updated by Alexander Bruy about 12 years ago

Works fine now. Thanks!

BTW, maybe it makes sense to clarify in docs requirements about omitting spaces around equal sign?

#10 Updated by Paolo Cavallini about 12 years ago

Isn't it better to trim the spaces? The current behaviour is somewhat unexpected (and we know people do not often read the docs, relying more on common usage).

#11 Updated by Alessandro Pasotti about 12 years ago

  • Status changed from Resolved to Closed

trimming done.

BTW fixing a parser because sources are out of specs is not always a good idea.
INI format specs are clear about key=value syntax: what comes after the = is the value (spaces included).

Also available in: Atom PDF