saltstack/salt — pull request #6321 by basepi (2013-07-25 23:12:47+00:00)
Title: Sort 'comps' and 'line' when comparing Debian repos, Fix #5517

This is a really hacky fix. Basically, both 'comps' (a list) and 'line' (a string) can end up out of order from your state args, so even though the repo is fully configured, the state reports it as needing to be configured.

So I'm sorting 'comps' and splitting and then sorting 'line' and comparing them.

I'm open to better ways of accomplishing this. I don't like this code.