Chop the onions and sauté them together with the garlic.
Then add tomato pieces, rosemary, thyme, salt, tomato paste and sugar. Pound a little and bring to a boil. Finally, add the red wine, parsley and chopped chili pepper. Leave the sauce on low heat for the pasta cooking time.