pkg install: what is the "first" repository?

Matthew Seaman m.seaman at infracaninophile.co.uk
Fri Jan 17 06:49:55 UTC 2014


On 17/01/2014 04:04, Matthew Pounsett wrote:
> 
> From the pkg man page:
>      install
>              Install a package from a remote package repository.  If a package
>              is found in more than one remote repository, then installation
>              happens from the first one.  Downloading a package is tried from
>              each package repository in turn, until the package is success-
>              fully fetched.
> 
> What is pkg's definition of "first"?  
> 
> I have a single file in /usr/local/etc/pkg/repos/ which lists two
> local repositories.  'vim' exists in the first one in that file.  All
> of vim's dependencies are available from that repo.  Some of its
> dependencies exist in both, since they're required by things
> available from both repositories.
> 
> For the dependencies that exist in both, pkg is trying to grab them
> from the second repository in that file.  I'm trying to figure out
> why, so I can make it stop.

'First' is just based on an alphabetical sort of the repo.conf files by
file name.  However, pkg(8) will generally look for the most recent
package available for any port, which will override that ordering
preference.

You can use 'pkg annotate' to force pkg(8) to always use a specific repo
for a particular port.  Details are in pkg-repository(5).

Note that there are changes in the pipeline which will make a
significant difference to the way pkg selects which repository to pull a
package from, as part of a complete revision of how dependency solving
works.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140117/50a86d54/attachment.sig>


More information about the freebsd-questions mailing list