Working with multiple repositories
Niklaas Baudet von Gersdorff
niklaas at kulturflatrate.net
Wed Jan 21 00:07:48 UTC 2015
Hi,
I have a server with several jails running. Works great and I am pretty
amazed. Recently I installed `poudriere` and finally managed to create
my own `pkg` repositories. At this stage I have two: one general one and
another one with specific compile options for all the jails that run
`postfix` and `dovecot`. In the second repository `postfix` is compiled
with SASL support and in the first one it isn't.
Access to my repositories works very fine from every jail but I still
have not figured out how to specify that the second repository needs to
be taken for `postfix` in one of the jails. `man pkg-repository` says:
WORKING WITH MULTIPLE REPOSITORIES
Where several different repositories are configured pkg will
search amongst them all in the order specified, unless directed
to use a single repository by the -r flag to pkg-fetch(8),
pkg-install(8), pkg-upgrade(8), pkg-search(8) or pkg-rquery(8).
The search order is as displayed in the output of
pkg -v -v
Works fine, I can see both repositories.
Where several different versions of the same package are
available, pkg will select the one with the highest version
to install or to upgrade an installed package to, even if a
lower numbered version can be found in a repository earlier
in the list. This applies even if an explicit version is
stated on the command line. Thus if packages example-1.0.0 and
example-1.0.1 are available in configured repositories, then
pkg install example-1.0.0
will actually result in example-1.0.1 being installed. To
override this behaviour, on first installation of the package
select the repository with the appropriate version:
pkg install -r repo-a example-1.0.0
and then to make updates to that package ``sticky'' to the same
reposi- tory, add an annotation to the package:
pkg annotate -A example repository repo-a
Unfortunately, does not work. I forced a reinstall of postfix with `pkg
install -f postfix -r second-repository` and after that did
pkg annotate -A postfix repository second-repository
but another `pkg upgrade` wants to install the package from
first-repository (since options changed).
I am not sure whether I might misunderstand the context of the man page.
I do _not_ want to install a specific version but from a specific
repository. Though, the way I understand it above commands should work
and another `pkg upgrade` should result in an "everything is fine"
message (since already the newest version from second-repository is
installed) and not try to install from first-repository again.
How can I specify that a package _always_ is installed from a repository
that is not listed as the first one in `/usr/local/etc/pkg/repos/`?
Any help is very much appreciated.
--
Niklaas
More information about the freebsd-pkg
mailing list