pull out code to update local hackage db into updateHackageDatabase