merge and resolve for input package