freebsd/pkg — pull request #970 by grembo (2014-08-18 02:32:53+00:00)
Title: pkg-version: New configuration option VERSION_SOURCE

This allows to set the default database used for version number
comparison.

The need for this came up while deploying package on a group of machines that are connected to a private repo. So usually we want to compare versions to the repo, but without specifying "-R" on the command line explicitly, there will always be an error message about INDEXFILE.

To make matters worse, sometimes you have a INDEXFILE or a ports tree without an INDEXFILE installed, even though packages should always be checked against the remote repository (or the other way round).

The advantage of implementing this instead of using one of the possible workarounds (ALIAS, setting INDEX- and/or PORTSDIR to nonexistent paths) is that it's explicit and won't break calling "pkg version" with I/R/P to override the configured default.