def install_single_icon(iconsrc, basename, size, context, is_last_icon=False):
filename = '%s-%s.png' % (basename, size)
render_img(iconsrc, filename, width=int(size), height=int(size))
-- cmd = ['xdg-icon-resource', 'install', '--noupdate', '--context', context, '--size', str(size), filename, basename]
-+ cmd = ['xdg-icon-resource', 'install', '--noupdate', '--novendor', '--context', context, '--size', str(size), filename, basename]
+- cmd = ['xdg-icon-resource', 'install', '--noupdate', '--context', context, '--size', unicode_type(size), filename, basename]
++ cmd = ['xdg-icon-resource', 'install', '--noupdate', '--novendor', '--context', context, '--size', unicode_type(size), filename, basename]
if is_last_icon:
del cmd[2]
cc(cmd)
cc(' '.join(cmd), shell=True)
self.menu_resources.append(x)
ak = x.partition('.')[0]
-@@ -856,10 +856,9 @@
- ak = x.partition('.')[0]
- if ak in APPDATA and os.access(appdata, os.W_OK):
- self.appdata_resources.append(write_appdata(ak, APPDATA[ak], appdata, translators))
-- cc(['xdg-desktop-menu', 'forceupdate'])
- MIME = P('calibre-mimetypes.xml')
- self.mime_resources.append(MIME)
-- cc(['xdg-mime', 'install', MIME])
-+ cc(['xdg-mime', 'install', '--novendor', MIME])
- except Exception:
- if self.opts.fatal_errors:
- raise
+@@ -856,8 +856,7 @@
+ MIME = P(MIME_BASE)
+ self.mime_resources.append(MIME_BASE)
+ if not getattr(self.opts, 'staged_install', False):
+- cc(['xdg-mime', 'install', MIME])
+- cc(['xdg-desktop-menu', 'forceupdate'])
++ cc(['xdg-mime', 'install', '--novendor', MIME])
+ else:
+ from shutil import copyfile
+ copyfile(MIME, os.path.join(env['XDG_DATA_DIRS'], 'mime', 'packages', MIME_BASE))