Rinse the mangoes and cut into chunks. Set the mango chunks aside. For a video demonstration on how to cut a mango, click here.
Dice the onion. In a medium pot, heat the vegetable oil and red pepper flakes. When the red pepper begins to leach color into the oil and the flakes darken slightly, add the onion and continue to cook until the onion softens.
As the onion and red pepper are cooking, peel a two inch knob of ginger with a vegetable peeler. Using a cheese grater, grate the peeled ginger straight into the pot with the onion and red pepper. Continue to cook until the onion has softened.
Add the mango chunks and canned pineapple (with juice) to the pot. Also add the brown sugar, vinegar and garam masala. Stir the mixture well and bring up to a simmer.
Let the mix simmer heavily for one hour. Stir the pot occasionally. As the chutney simmers, the fruit will break down and the liquid will thicken until finally you will have a more jam like consistency. If using raisins, add them toward the end of the cooking time (about 45 minutes in). Serve hot or cold.