Only download and install packages if necessary.