Sift the flour. Make a well in it and crumble the fresh yeast in it. Pour the cool water on top. Add the sugar and salt. Knead a soft dough. Leave the dough to rise for 20-30 min.
In the meantime, prepare the filling. Chop the onion into small pieces. Braise in hot oil and season with the spices. Once the onions are fried, remove from the stove. Once the dough has risen, divide it into 2 balls.
Roll out 1 of the balls of dough and put it in an oiled and floured oven dish. Pour the onion filling over it and distribute evenly. Roll out the 2nd ball of dough.
Cover the onion filling with it. Fold the edges of the dough downward. Leave the onion pie for about 15 min. Smear it with 1 beaten yolk and a little oil on top.
Bake in a preheated 356°F (180 °C) oven until it gains a golden crust. Once it's ready, sprinkle it with a little water and cover it for 10 min.