returning the sorted set of sources in _Automoc::__call__ actually returns a list sorted on object pointers

Bug #684933 reported by Danny Valente
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SCons Qt4 Tool
Fix Committed
Medium
Dirk Baechle

Bug Description

in the method _Automoc::__call__, a sorted set of sources are returned from the emitter. The call to "sorted" is done on a set of Entry objects however.

A cmp argument is needed to be passed to the sorted function in order to sort on the file names correctly instead.

Changing the line to this:

return (target, sorted(set(out_sources), lambda x,y: cmp(str(x),str(y))))

fixes the poblem.

Otherwise, the scons builds again because the dependencies order has changed in most cases.

Revision history for this message
Dirk Baechle (dl9obn) wrote :

Hi Danny,

and thanks a lot for the bug report. I'll have a look...

Best regards,

Dirk

Changed in scons-qt4:
assignee: nobody → Dirk Baechle (dl9obn)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Dirk Baechle (dl9obn) wrote :

I checked in a new revision #18, it corrects the problem by specifying a key() for proper comparison of file/entry names. A new testcase for this bug was added too.

Dirk

Changed in scons-qt4:
status: In Progress → Fix Committed
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.