From owner-freebsd-ports@freebsd.org Fri Jul 28 09:40:39 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A834DC1D77 for ; Fri, 28 Jul 2017 09:40:39 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 8550C7EB03 for ; Fri, 28 Jul 2017 09:40:39 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: by mailman.ysv.freebsd.org (Postfix) id 81ACCDC1D76; Fri, 28 Jul 2017 09:40:39 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81493DC1D75 for ; Fri, 28 Jul 2017 09:40:39 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (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 45D917EB00 for ; Fri, 28 Jul 2017 09:40:38 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id D15CA2848D; Fri, 28 Jul 2017 11:40:28 +0200 (CEST) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 9E321284B1; Fri, 28 Jul 2017 11:40:27 +0200 (CEST) Subject: Re: Pkg does not upgrade if more than one repository is defined To: Matthias Fechner , ports@freebsd.org References: <4bd07372cbebf842be96c9269ac7e274@fechner.net> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <597B068B.3010106@quip.cz> Date: Fri, 28 Jul 2017 11:40:27 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <4bd07372cbebf842be96c9269ac7e274@fechner.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 09:40:39 -0000 Matthias Fechner wrote on 2017/07/28 10:55: > Dear all, > > I have a problem with pkg and I'm not sure if it is a bug in pkg or a > configuration issue. > I work on new version on ports which are in a separate poudriere > repository (to be able to easily test it). > > I have now two configuration files in /usr/local/etc/pkg/repos, > poudriere.conf: > poudriere: { > url: "https://pkg.fechner.net/packages/110amd64-default", > mirror_type: "pkg+http", > signature_type: "pubkey", > pubkey: "/usr/local/etc/ssl/certs/pkg.cert", > enabled: yes, > priority: 1 > } > > this is the standard repo which contains all stable packages. > Now I have a new version (in this case for gitlab) at gitlab.conf: > gitlab: { > url: "https://pkg.fechner.net/packages/110amd64-gitlab", > mirror_type: "pkg+http", > signature_type: "pubkey", > pubkey: "/usr/local/etc/ssl/certs/pkg.cert", > enabled: yes, > priority: 10 > } > > The priority is higher and some package there have a higher version number. > > But if I execute now 'pkg upgrade' pkg does not upgrade packages which > have a higher version from the gitlab repository, but stick to the > poudriere repository. > > I also tried to do a 'pkg update -f; pkg upgrade' but it does not help. > > Is there something wrong with my configuration or is this a bug in pkg? If I understand you correctly, you have package A-1.0 installed from repo "poudriere" and now you have package A-1.1 in repo "gitlab" and you want to upgrade this package "A" to version 1.1. Is it right? I think that crossrepo upgrade is not automatic if package is in both repositories but it work if package is missing from previous repo and it it intentional. I have more repositories too (different PHP version, different python versions but common utilities etc.) so packages are not unintentionally upgraded / downgraded. But if you want to upgrade package A from different repo, you can choose the repo: -r reponame, --repository reponame Install packages from only the named repository, irrespective of the configured ``active'' status from repo.conf. You can try pkg install -r gitlab -f A or pkg upgrade -r gitlab -f A where A is you package(s) name. Miroslav Lachman