Put the aubergine into a large pan of boiling water. Simmer for 10–12 minutes until soft, then drain thoroughly. Heat half the oil in a pan and fry the onions until softened and lightly coloured. Add the garlic and fry for a minute more. Remove the onions and garlic from the pan and set aside.