Peel eggplant and cut into 1 inch pieces. Heat 1 cup oil in a large heavy frying pan. Cook eggplant in a layer over medium heat stirring constantly, until it is soft and brown. Do not overcook. Put cooked eggplant in a bowl. Add remaining oil and cook onions for 3- 5 minutes or until soft. Add tomatoes and celery. Cook stirring frequently, until celery is soft. If necessary to prevent scorching add a little water.
Add capers, parsley, olives, pine nuts and the fried eggplant and mix well. Remove from heat. Heat vinegar and sugar in a small saucepan. Stir until sugar is dissolved. Pour over the vegetables.
Season with salt, pepper and pepper flake. Return to lowest possible heat. Simmer covered stirring frequently for about 20 minutes. If necessary add a little water to prevent scorching about 1 tablespoon at a time; the Caponata should be soft but not soupy.
Cool before serving.