dh_scour brakes onboard by removeing style element in svg files

Bug #690994 reported by Jpruedagalan-yahoo
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
onboard (Ubuntu)
Fix Released
Undecided
Martin Pitt
Natty
Fix Released
Undecided
Martin Pitt
scour (Ubuntu)
Fix Released
High
Martin Pitt
Natty
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: onboard

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/Onboard/KeyboardSVG.py", line 117, in load_layout
    self.load_pane_svg(pane_config, pane_svg))
  File "/usr/lib/python2.7/dist-packages/Onboard/KeyboardSVG.py", line 84, in load_pane_svg
    self.load_keys_geometry(pane_svg, keys)
  File "/usr/lib/python2.7/dist-packages/Onboard/KeyboardSVG.py", line 142, in load_keys_geometry
    styleString = rect.attributes["style"].value
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 524, in __getitem__
    return self._attrs[attname_or_tuple]
Onboard.Exceptions.LayoutFileError: Error al cargar /usr/share/onboard/layouts/Default-Alpha.svg
KeyError: 'style'

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: onboard 0.94.0-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.37-8.21-generic 2.6.37-rc4
Uname: Linux 2.6.37-8-generic i686
Architecture: i386
Date: Thu Dec 16 09:48:33 2010
InstallationMedia: Ubuntu-Netbook 10.04 "Lucid Lynx" - Release i386 (20100429.4)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=es_ES:es:en_GB:en
 LANG=es_ES.UTF-8
 LC_MESSAGES=es_ES.utf8
 SHELL=/bin/bash
SourcePackage: onboard

Revision history for this message
Jpruedagalan-yahoo (jpruedagalan-yahoo) wrote :
Changed in onboard (Ubuntu):
assignee: nobody → Francesco Fumanti (frafu)
Revision history for this message
Jpruedagalan-yahoo (jpruedagalan-yahoo) wrote :

Now is running.
Error in format of svg.
Onboard require "SVG Plane format" with "style" attribute, but "Inkscape formar" don't save xml format with it. (Sorry for my English)
Solution:
Save keyboard files with svg plane format.

Open files /usr/share/onboard/layouts/Default*.svg with Inkscape and "Save as" with plane format.
sudo inkscape /usr/share/onboard/layouts/Default-Alpha.svg
sudo inkcape /usr/share/onboard/layouts/Default-Functions.svg
sudo inkscape /usr/share/onboard/layouts/Default-Editions.svg

Thanks, and waiting for changes in package.

Revision history for this message
Francesco Fumanti (frafu) wrote :

Hi,

Thanks for the feedback, but the problem is the other way round:

The source package of onboard uses the style attribute in the svg files. Recently canonical introduced dh-scour in its packaging system that tries to optimize the svg files and that changes the style attribute into fill and stroke attributes. This breaks the onboard code which is looking for the style attribute.

Before deciding how to procedeed with this bug (adapting the code or the packaging), I will try to get some feedback from the ubuntu developers.

Thanks nevertheless for your helpful message.

summary: - Layoutfileerror Default on execute
+ dh_scour brakes onboard by removeing style element in svg files
Revision history for this message
Francesco Fumanti (frafu) wrote :

I have also opened a question related to the problem, where I wonder whether--disable-style-to-xml should not be the default in dh-scour:
https://answers.launchpad.net/ubuntu/+source/scour/+question/138603

Revision history for this message
Martin Pitt (pitti) wrote :

I'll change dh_scour to use --disable-style-to-xml by default.

Changed in scour (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
milestone: none → natty-alpha-2
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package scour - 0.25+bzr194-0ubuntu4

---------------
scour (0.25+bzr194-0ubuntu4) natty; urgency=low

  * debian/dh_scour: Use --disable-style-to-xml option by default.
    (LP: #690994)
 -- Martin Pitt <email address hidden> Fri, 31 Dec 2010 10:24:30 +0100

Changed in scour (Ubuntu Natty):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

I'll upload a no-change onboard package once the fixed scour is published in natty.

Changed in onboard (Ubuntu Natty):
assignee: Francesco Fumanti (frafu) → Martin Pitt (pitti)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package onboard - 0.94.0-0ubuntu2b1

---------------
onboard (0.94.0-0ubuntu2b1) natty; urgency=low

  * No-change upload to build against fixed dh_scour. (LP: #690994)
 -- Martin Pitt <email address hidden> Fri, 31 Dec 2010 10:26:25 +0100

Changed in onboard (Ubuntu Natty):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.