Heat 2 tbsp oil in a large pan over a medium heat. Add ½ the finely chopped onion and cook for 5 minutes, or until soft and translucent. Add the tomatoes to the pan (crushing them with a fork to break them up), along with the garlic, tomato purée, sugar and rosemary.