Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Nov 2013 08:32:47 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: pkgng repository priorities
Message-ID:  <52760A2F.7030204@FreeBSD.org>
In-Reply-To: <826cd3ab0c12abf926b1ba9a230b8226@mail.lifanov.com>
References:  <826cd3ab0c12abf926b1ba9a230b8226@mail.lifanov.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--wlWhvmhOAVhK4mb9nOl6aJLlMKFW6P5Mb
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 03/11/2013 01:44, Nikolai Lifanov wrote:
> Is there any documentation about how to use PKGNG repository priorities=
?
> I heard that these are available.
>=20
> Currently, I have my repository configurations like this:
> 1-myrepo.conf
> 2-anotherrepo.conf
> 3-someotherthirdpartyrepo.conf
>=20
> This roughly prefers stuff from what appears first in asciibetical orde=
r.
>=20
> I would like to use the official FreeBSD package sets, but to do this, =
I
> need to always prefer a package from a local repository (WITH_NEW_XORG,=

> WITH_KMS) if a package is available in it.

There is no such concept as 'repository priority' at the moment.  This
may change in the future, but no one has come up with any code yet, nor
even a plan on how it might be implemented.

What you can do is this:  in your repo.conf -- eg:

FreeBSD: {
  URL: http://pkg.freebsd.org/${ABI}/latest
  ENABLED: yes
  MIRROR_TYPE: SRV
}

the tag 'FreeBSD' is used in the name of the sqlite database file use to
hold the repository catalogue:

  /var/db/pkg/repo-FreeBSD.sqlite

Where you have several repsitories, these database files are effectively
loaded into sqlite in alphabetical order ie. the order you see by doing

   ls -1 /var/db/pkg/repo-*.sqlite

and many of the queries used will return the result rows from repos
earlier in the alphabet before the rows from repos later in the
alphabet.  It is not designed intentionally as a means of controlling
preference between repositories, but much of the time it seems to work
that way.

So don't rely on it; be prepared for the behaviour to change in the
future (in particular, the new solver that's in the works will make a
big difference here) and where you want to force a package to always be
installed from a particular repository you can do it like this:

On first installation:

    pkg install -r myrepo foo

Then to ensure 'foo; is subsequently always the version supplied from
'myrepo':

    pkg annotate -A foo repository myrepo

See pkg-repository(5).

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



--wlWhvmhOAVhK4mb9nOl6aJLlMKFW6P5Mb
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJ8BAEBCgBmBQJSdgo2XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATIGcP/AvNbLeoMzeCY0PNSg6+zG6t
nBhWuAvcDu3b2HdAfnpOX9Ri9uGy0iADjsACE7PaDK0SUGLggdrSa5YQp5Q/FVvg
/hkWLXUxnMMfSnwyd9sbj/RJ0XAeR3IdECo2WF3/G/nr1IDlXAUOlOGPrWfbwbPi
31qoqmfDTr0PzI73na0OUIu1Dp8RKJz4jPgjOb9y+duC4FyWmSDstKHjrl0Apvly
zPPZzjRbVNzb2Q5yo8P5MhNaWJ3JaAcApsQqK2nAFdeTPWwNIiip5290MUvAeLdP
+R2In70O0Q+9nEv7wZ8t5kLfOnHR3VdEVPPMhtjD1U1/PNwvpCeiZIcGtrT6pE+z
kFRAKinm48a74d2DcMoWJxiHWw6z0Fe/mTL3LWOt8ZHFgSzxOhPCJL9H7Jpjs/Mg
MD5BttUYLHZUW5CQ9dEbgPs4BviQKwI1EYDu8D5g6+C/aTi5HCnRR8ibpOd+xf/q
LPi+gOb0mEim7ctEL+nBmiznBfbhG4JS1xLcqFNYdoz150gqTHxGeAiguqCMhkhV
R9Lk31SwkvoG7p+NWhGkgOKsrOw13qp+uDg0G9riqStZyeuB3E7RHUqb9aZYiTms
wgo/9K4LRcE6EN/BP62EfenXnxdJ0jSxYk5MggSr3dFVsqyPJy469vvzinDyPqsM
9RJtqXP1Dr+UCkueSF0O
=Dl73
-----END PGP SIGNATURE-----

--wlWhvmhOAVhK4mb9nOl6aJLlMKFW6P5Mb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52760A2F.7030204>