Packaging bug - Image file alteration causes issues

Bug #685421 reported by Ynot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NULL Project
Invalid
Undecided
Unassigned
hedgewars (Ubuntu)
Fix Released
High
Martin Pitt
pkgbinarymangler (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: hedgewars

Hedgewars (worms clone) complains that some images are not 32bit

Last two engine messages:
Loading
/usr/share/games/hedgewars/Data/Graphics/Girder.png
[flags: 14]ok (100x16)
Generating collision info... Land object should be 32bit

Hedgewars (and probably many other games as well) require images in specific formats
In this example, Hedgewars needs PNG graphics files in 32bit RBG

Recent packaging optimisations change images (pngcrush?)
so now images differ from what application expects

Error above caused by /usr/share/games/hedgewars/Data/Graphics/Girder.png being optimised from a 32bit RGB PNG to an 8bit grayscale PNG

If original graphics replaced, game operates as expected

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: hedgewars-data 0.9.14.1-1
ProcVersionSignature: Ubuntu 2.6.37-7.19-generic 2.6.37-rc3
Uname: Linux 2.6.37-7-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sun Dec 5 08:56:17 2010
Dependencies:

InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
PackageArchitecture: all
ProcEnviron:
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: hedgewars

Revision history for this message
Derek (bugs-m8y) wrote :

We have gotten multiple complaints about this. Until now, I hadn't realised it was due to a packaging error.

This does seem like a serious packaging flaw.

http://code.google.com/p/hedgewars/issues/detail?id=102

http://hedgewars.org/node/2614#comment-17843

Also people stopping by IRC.

Revision history for this message
Ynot (tatkinson321) wrote :

I understand Ubuntu's need to squash image sizes down as much as poss. (esp. for stuff on the LiveCD)
But perhaps some sort of flag needs to be added to debs to toggle whether images are optimised?
Default to never optimise images, and enable only when known to cause no issues

Revision history for this message
Derek (bugs-m8y) wrote :

We already optimise all our PNGs anyway, and try very hard to remember to recheck them all before releasing.

Optimising is harmless if done none-lossily and can save a lot of space, but shouldn't offer much benefit to Hedgewars since we're always concerned about size already.

A more useful optimisation if they are concerned about space would be if we release a bugfix hedgewars, to not release a bugfix hedgewars-data even if nothing changes. I have no idea why they do that. Requires downloading a huge amount of redundant data.

They can't link a 0.9.14.1 hedgewars package to a 0.9.14 hedgewars-data ?

Ynot (tatkinson321)
Changed in hedgewars (Ubuntu):
status: New → Confirmed
Revision history for this message
Ynot (tatkinson321) wrote :

On advice from #ubuntu-bugs, I've added pkgbinarymangler to the affected list

Micah Gersten (micahg)
affects: pkgbinarymangler → null
Revision history for this message
Ynot (tatkinson321) wrote :

Sorry to bump this,
but seeing as this affects an unknown number of applications in unknown ways I think this should be quite high on the priority list
I'm sure games are not the only programs that depend on the image files they ship being unaltered

The fact that images are being altered with unpredictable consequences for applications will surely cause many unneeded bug reports if this issue hangs around for too long

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

Thanks for pointing this out. Most non-games applications just use libpng, where the depth of the image doesn't matter.

But indeed games often do some special tricks; as a first step I could disable the PNG compression for packages in the "games" section, which would include hedgewars as well. Does that sound reasonable to you?

Changed in pkgbinarymangler (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Ynot (tatkinson321) wrote :

That sounds great
Thank you

However I can't help but worry that this will cause hard-to-narrow-down issues for other types of programs as well
(esp. with the work going on to include commercial apps - seemingly unintrusive changes to the packaging breaking stuff, with no easy way to debug)

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

Will rebuild hedgewars once the fixed mangler is in.

Changed in hedgewars (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: Confirmed → In Progress
Changed in null:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkgbinarymangler - 89

---------------
pkgbinarymangler (89) natty; urgency=low

  * pkgstripfiles: Games are prone to rely on a particular PNG image format,
    so skip PNG optimization for "Section: games". Add test case.
    (LP: #685421)
  * pkgstripfiles: Also skip PNG squashing if $NO_PNG_PKG_MANGLE is set; this
    allows packages to selectively disable PNG optimization without disabling
    the other parts of pkgbinarymangler. Add test case.
  * debian/control: Bump Standards-Version to 3.9.1 (no changes necessary).
 -- Martin Pitt <email address hidden> Fri, 10 Dec 2010 10:50:46 +0100

Changed in pkgbinarymangler (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hedgewars - 0.9.14.1-1build1

---------------
hedgewars (0.9.14.1-1build1) natty; urgency=low

  * No-change rebuild against current pkgbinarymangler to leave our PNGs
    alone. (LP: #685421)
 -- Martin Pitt <email address hidden> Fri, 10 Dec 2010 14:29:48 +0100

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

Note that the package currently doesn't build because the haskell toolchain is broken right now:

The following packages have unmet dependencies:
 libghc6-hslogger-dev : Depends: libghc6-unix-dev-2.4.0.0-297f3 but it is not installable

as soon as that gets fixed, the build can be retried.

Revision history for this message
Ynot (tatkinson321) wrote :

brilliant,
thanks for the quick response

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.