In a small bowl, mix red pepper flakes with oil and let it sit for 4 to 5 hours.
On medium heat, pour oil mixture in a fine sieve over a large deep saucepan and discard the red pepper flakes. When hot, add onions and red peppers; sauté until soft, about 3 minutes.
Add ginger and sauté for 1 minute.
Add chopped mangoes and cook for 5 minutes.
Meanwhile in a medium bowl, combine pineapple juice, vinegar, sugar, curry powder, turmeric, and allspice; whisk well.
Pour pineapple mixture in the saucepan and stir; season with salt and pepper.
Turn the heat to medium-high and bring the mixture to a simmer. Reduce the heat to medium and simmer until it thickens, about 35 to 45 minutes, stirring often.
Pour hot chutney into prepared jars and process in the water bath for 15 minutes.