← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/fix-sprite-rebuild-rules into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/fix-sprite-rebuild-rules into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/fix-sprite-rebuild-rules/+merge/63791

icon-sprites and icon-sprites.positioning were recently changed to no longer be version-controlled, instead being built during deployment or on developer machines. This has made a Makefile bug apparent: they are not regenerated when new sprites are added to sprite.css.in. This manifests itself as a crash when a new sprite is added, like so: 

utilities/shhh.py bin/sprite-util create-css
Traceback (most recent call last):
  File "bin/sprite-util", line 64, in <module>
    sprite_util.saveConvertedCSS(css_file, '../icon-sprites')
  File "/home/wgrant/launchpad/lp-branches/devel/lib/lp/services/spriteutils.py", line 246, in saveConvertedCSS
    position = self.positions[sprite['filename']]
KeyError: u'../images/mute.png'

This branch fixes the Makefile to regenerate positioning when the CSS is changed.
-- 
https://code.launchpad.net/~wgrant/launchpad/fix-sprite-rebuild-rules/+merge/63791
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/fix-sprite-rebuild-rules into lp:launchpad.
=== modified file 'Makefile'
--- Makefile	2011-04-22 14:02:29 +0000
+++ Makefile	2011-06-08 01:02:32 +0000
@@ -163,7 +163,8 @@
 
 sprite_image: ${ICING}/icon-sprites ${ICING}/icon-sprites.positioning
 
-${ICING}/icon-sprites.positioning ${ICING}/icon-sprites: bin/sprite-util
+${ICING}/icon-sprites.positioning ${ICING}/icon-sprites: bin/sprite-util \
+		${ICING}/sprite.css.in
 	${SHHH} bin/sprite-util create-image
 
 # We absolutely do not want to include the lazr.testing module and