The purpose of the rioting is for the gangs to impose a cost on the city for shooting one of their own. The objective is to intimidate the cops into hesitating before firing on an armed gang-banger.
The only solution would be to open fire on the rioters.