Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2017 12:13:36 +0100
From:      Matt Smith <matt.xtaz@gmail.com>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        Matthias Fechner <idefix@fechner.net>, ports@freebsd.org
Subject:   Re: Pkg does not upgrade if more than one repository is defined
Message-ID:  <20170728111336.GA55676@gmail.com>
In-Reply-To: <597B068B.3010106@quip.cz>
References:  <4bd07372cbebf842be96c9269ac7e274@fechner.net> <597B068B.3010106@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 28 11:40, Miroslav Lachman wrote:
>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
>

This might also be related to the CONSERVATIVE_UPGRADE setting of 
pkg.conf. According to the man page:

CONSERVATIVE_UPGRADE: boolean
Ensure in multi repository mode that the priority is
given as much as possible to the repository where a
package was first installed from.  Default: YES.


-- 
Matt



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