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

Issue #7 resolved
repo owner created an issue

Originally reported by Danny Valente:

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.

Comments (2)

  1. dirkbaechle reporter

    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.


  2. Log in to comment