Only run apt-get update when needed.