From owner-freebsd-pkg@FreeBSD.ORG Wed Jan 21 00:07:48 2015 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3BDACC6 for ; Wed, 21 Jan 2015 00:07:48 +0000 (UTC) Received: from mail.kulturflatrate.net (mail.kulturflatrate.net [46.163.119.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3196E1BB for ; Wed, 21 Jan 2015 00:07:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.kulturflatrate.net (Postfix) with ESMTP id A7700F5ACDB6; Wed, 21 Jan 2015 00:56:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at kulturflatrate.net X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham Received: from mail.kulturflatrate.net ([127.0.0.1]) by localhost (mail.kulturflatrate.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qCHZHG0rqsG8; Wed, 21 Jan 2015 00:56:24 +0100 (CET) Received: from len-x61s.klaas (122.210.broadband18.iol.cz [109.81.210.122]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kulturflatrate.net (Postfix) with ESMTPSA id 160D0F5ACDB5; Wed, 21 Jan 2015 00:56:14 +0100 (CET) Received: by len-x61s.klaas (Postfix, from userid 1000) id 1359FE231E; Wed, 21 Jan 2015 00:58:00 +0100 (CET) Date: Wed, 21 Jan 2015 00:58:00 +0100 From: Niklaas Baudet von Gersdorff To: freebsd-pkg@freebsd.org Subject: Working with multiple repositories Message-ID: <20150120235800.GA13299@len-x61s.klaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Key: http://www.kulturflatrate.net/niklaas/niklaas-baudet-von-gersdorff.asc User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 00:07:48 -0000 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