Remove scour dependancy while building Humanity

Bug #734955 reported by Vish
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
humanity-icon-theme (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: humanity-icon-theme

Scour is not production ready, and the authors themselves acknowledge that it does not always preserve the original image : <http://www.codedread.com/scour/> From their own page: "NEVER USE SCOUR TO OVERWRITE YOUR ORIGINAL FILE!"
Louis Simard mentions : "Scour is not reliable enough to use on input files to replace them" This is why they dont allow input and output names to be the same.

However, we have this brand new unreliable package in natty building packages since it saves space.

While it maybe be acceptable for other programs to use scour, (icons are not part of their main purpose), it is not reasonable to use it for building icon themes whose main and **only** purpose is to have properly colored/designed icons.

Build 0.5.3.5 of Humanity was completely changed and several of the icons were not even close to what we had designed.
For Build 0.5.3.6 we added a fuzzy SVG comparison script ,cmpsvg, to check the difference and only accept of difference is less than 0.5% !!!

As i'v mentioned on bug 702423 0.5% is way too high, several icons escape this check and look completely different to what it was designed. I'v already found atleast 15 icons which have been modified.
 http://launchpadlibrarian.net/66175607/Scour%27s-Redesign.png < The Poor ball looks like its head got shaved , and the CD icons look like they have been bruised instead of reflecting light.. ;-p

Saying the 0.5% is an acceptable ratio for removal is like telling a developer that it is OK if 0.5% of their code at random will be removed during packaging.

We dont even know what 0.5% will be changed , so we cant even make icons and be assured that it will be distributed right.

However, space used *is* important, and even we, at the elementary team, are pedantic about this.
We have always saved the files as plain svg, because it was the only option we had until now.

So, what I have done is I have manually scoured ,using rev 207 from lp:scour, and checked *all* the svg and
* reduced the size from 21.8MB to 12.3MB *, the optimized branch is at lp:~ubuntu-art-pkg/humanity/release
Only 18 icons have not been scoured since they have bugs: Bug #734885 , Bug #734933 , Bug #734019

This reduced size is 3.5MB lesser than the size in package 0.5.3.6, which is 15.8 MB

Since space is the main reason this was done, I would suggest that we drop the scour dependency until scour is production ready.

Vish (vish)
Changed in humanity-icon-theme (Ubuntu):
importance: Undecided → High
Vish (vish)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

> Scour is not reliable enough to use on input files to replace them

That's correct. However, that means "you should keep your original file around instead of assuming that you can continue to edit the scour'ed result in Inkscape". It isn't supposed to mean "the icons are meant to look different".

If it's merely the error treshold which is a concern here: How about just lowering that to 0.0%?

> So, what I have done is I have manually scoured ,using rev 207 from lp:scour, and checked *all* the svg and
> * reduced the size from 21.8MB to 12.3MB *, the optimized branch is at lp:~ubuntu-art-pkg/humanity/release

You mean you actually committed the scour'red results? Don't! That's precisely the big fat warning that scour has stamped on which you pointed out above. That will actually change the original files and make them uneditable in Inkscape.

Revision history for this message
Vish (vish) wrote :

A 0.0% check would be awesome! :)

Oh, lp:~ubuntu-art-pkg/humanity/release is just a release branch, we have another branch where we have them as plain svg alone, btw, they are editable in inkscape and I've also manually double checked the files too.. :)

I did some digging before converting them: <http://wiki.inkscape.org/wiki/index.php/Save_Cleaned_SVG#Scour>
Its the new "optimized svg" option we have built into inkscape itself, (its been available in the recent 0.47 version), but the version in inkscape is older(0.25?) than the bzr one.

I had noticed the optimized svg option but had not looked closer into it..

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

Just cross-checking:

$ scour --disable-style-to-xml -i gnome-dev-pcmcia.svg -o o.svg
$ ~/debian/scour/debian/cmpsvg gnome-dev-pcmcia.svg o.svg
difference: 3.352%

So these cases should be caught even with the current dh_scour treshold.

Also, I noticed that the diff calculcation in the current natty scour package is wrong, I fixed that.

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

Vish,

I uploaded the fixed scour to sid and natty now.

I still pledge you to revert the SVG modifications in the branch. The source package of h-i-t should contain the original icons which you actually use for editing (i. e. the ones in the master branch). The package is GPL, and thus the source package must contain the preferred form of modification, which are the original files, not the pre-scour'ed ones.

Revision history for this message
Vish (vish) wrote : Re: [Bug 734955] Re: Remove scour dependancy while building Humanity

On Tue, 2011-03-15 at 08:29 +0000, Martin Pitt wrote:
> Just cross-checking:
>
> $ scour --disable-style-to-xml -i gnome-dev-pcmcia.svg -o o.svg
> $ ~/debian/scour/debian/cmpsvg gnome-dev-pcmcia.svg o.svg
> difference: 3.352%
>
> So these cases should be caught even with the current dh_scour treshold.
>

Yup, the 18 icons i noticed now with rev 207 from lp:scour , did *not*
get through earlier.

But what I am concerned in this bug was that the 0.5% check was not good
and let a different set of icons got altered *visibly* when scour was
not working properly.

Right now, rev 207 is good, with most icons, but I was concerned is that
this could happen again in a later rev and similarly we would have the
same problem of some random icons getting corrupted.

Hence I'm OK if a 0.0% check is set for Humanity, this would ensure
nothing corrupted gets through.

> Also, I noticed that the diff calculcation in the current natty scour
> package is wrong, I fixed that.
>

Lets hope this was the only cause they got through.. :-)

If we want to check exactly what percent got though with the old diff
calculation, we could check :
/usr/share/icons/Humanity/categories/48/applications-sports.svg
/usr/share/icons/Humanity/categories/48/applications-geography.svg
/usr/share/icons/Humanity/apps/48/evolution.svg
/usr/share/icons/Humanity/apps/48/wmtweaks.svg
/usr/share/icons/Humanity/apps/32/wmtweaks.svg
/usr/share/icons/Humanity/actions/48/window-new.svg
/usr/share/icons/Humanity/apps/32/gnome-panel-force-quit.svg
/usr/share/icons/Humanity/categories/48/applications-utilities.svg
/usr/share/icons/Humanity/devices/48/media-cdr.svg
/usr/share/icons/Humanity/devices/48/media-cdrom-audio.svg
/usr/share/icons/Humanity/devices/48/media-cdrw.svg
/usr/share/icons/Humanity/devices/48/media-dvd.svg

Any idea what the diff for these were?

--
Cheers,
Vish

Revision history for this message
Vish (vish) wrote :

On Tue, 2011-03-15 at 08:32 +0000, Martin Pitt wrote:
>
> I still pledge you to revert the SVG modifications in the branch.

OK, will revert to release branch to plain svg too.. :)

Revision history for this message
Vish (vish) wrote :

On Tue, 2011-03-15 at 08:32 +0000, Martin Pitt wrote:
 The
> package is GPL, and thus the source package must contain the preferred
> form of modification, which are the original files, not the pre-scour'ed
> ones.
>

Reverted the commit..
Thanks for rebuilding Humanity.. :)

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

Hey Vish,

Vish [2011-03-15 9:17 -0000]:
> If we want to check exactly what percent got though with the old diff
> calculation, we could check :

The percentages are in the build log:

  http://launchpadlibrarian.net/66148562/buildlog_ubuntu-natty-i386.humanity-icon-theme_0.5.3.6_BUILDING.txt.gz

Unfortunately they don't show the full path, just the name.

> /usr/share/icons/Humanity/categories/48/applications-sports.svg

0.38% (just one size for this). I. e. got through in last build, won't
any more with current scour. (Also keep in mind that these percentages
were potentially too low, due to the missing abs() in the difference
addition)

> /usr/share/icons/Humanity/categories/48/applications-geography.svg

0.44% (also just one size for this)

> /usr/share/icons/Humanity/apps/48/evolution.svg

One 0.10%, the other 1.52% (that got rejected).

> /usr/share/icons/Humanity/apps/48/wmtweaks.svg
> /usr/share/icons/Humanity/apps/32/wmtweaks.svg

The two biggest diffs were .37% and .44%, the others were .01% or
lower.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package humanity-icon-theme - 0.5.3.7

---------------
humanity-icon-theme (0.5.3.7) natty; urgency=low

  * Rebuild with latest Scour and 0.0% check; (LP: #734955)
 -- K Vishnoo Charan Reddy <email address hidden> Tue, 15 Mar 2011 11:28:01 -0530

Changed in humanity-icon-theme (Ubuntu):
status: New → 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.