Peel the onion and carrot, then chop very finely. Cook the pasta until al dente according to the package instructions.
Heat vegetable oil in a pan and sauté carrot with onion in it. Add tomato paste and garlic. Gradually add the tomatoes and reduce a little. Add the olive pieces, capers, basil, sugar, pepper and olive oil. If necessary, add salt to taste. Let everything simmer for another 7 minutes.
Serve on top of the pasta with freshly grated parmesan.