Heat the oil in a saucepan and fry the onion and garlic until softened. Add the tomato purée and cook, stirring frequently, for five minutes.
Add the chopped tomatoes and vegetable stock and bring to the boil. Reduce the heat and simmer for 40 minutes, to make a thickish sauce.
Blend the sauce with a hand blender and pass through a sieve. Season well with salt and freshly ground black pepper.
In a frying pan, fry the bacon until crisp, then add the beans and the tomato sauce and heat through.
To serve, place the beans on top of the brioche, spread with yeast extract if desired.