Implement components recovery mechanism.

Change-Id: Ife47d97a663f5237a3d622b414bc21874119d309
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>