ludo@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> Okay. I was relying on the fact that attempts to install a derivation >> that's already installed will ultimately be ignored, and my (admittedly >> simple) tests seem to suggest that it works properly, but perhaps this >> approach will be too inefficient when the profile contains a large >> number of packages. > > More importantly, you don’t want upgrade to downgrade. Ah, good point! :) > For instance, if guile-1.8.8 turns out to be before guile-2.0.7 in the > package list, users who’ve installed the latter shouldn’t suddenly > downgrade to the former. Would "guix-package -i guile" ever choose guile-1.8.8 over guile-2.0.7 if the latter was available? Does it not automatically choose the newest available version? If not, should it? > I’ll take care of the tests and -e. Great, thanks! I've attached a new implementation of --upgrade along the lines you suggested. Still remaining to be done: if there are multiple packages with the same (newest) version number, choose intelligently between them. The first patch moves 'version-string>?' to (guix utils) and renames it to 'version>?'. It also adds 'version-compare'. I needed these for the improved upgrade implementation. Comments and suggestions solicited. Mark