Heat ½tsp oil in a pan and on low heat, gently toast the ingredients for the masala paste for about 2 minutes, till fragrant, adding the Kashmiri chilli powder only in the last 20 seconds . Stir continuously taking care to not burn the spices.
Cool the spices for 5 minutes before grinding them to a thick, smooth paste using a little water.
In the same pan, tip in the pineapple, add a cup of water, turmeric and salt, and cook for 10 minutes till the fruit is somewhat tender.
Now add the masala paste, and jaggery (adding a little more water if necessary), stir well and simmer for a further 10 minute till everything is well combined and you have a thickish sauce. Turn off the heat.
In a smaller pan, heat the remaining oil till hot and temper with mustard seeds, asafoetida and curry leaves till they crackle. Pour this tempering over the cooked gojju and mix.