How to change repository name of installed packages in local database?

Baptiste Daroussin bapt at FreeBSD.org
Tue Jun 28 10:33:20 UTC 2016


On Tue, Jun 28, 2016 at 12:16:17PM +0200, Miroslav Lachman wrote:
> I searched the man pages but cannot find the answer.
> If we have machine with packages installed from more than one repository and
> one day we want to use some already installed packages from another
> repository, is there any easy way of switching this packages to another
> repo?
> I am looking for something similar to "pkg set" but we do not want to change
> package name or package origin but package repository information recorded
> in sqlite.
> 
> Example:
> 
> # pkg query '%R %n' | sort
> codelab libiconv
> codelab mariadb55-server
> codelab p5-Error
> codelab p5-Term-ReadKey
> codelab p5-subversion
> codelab pkg-rmleaf
> codelab unzip
> codelab vim-lite
> redmine320 ImageMagick-nox11
> redmine320 ca_root_nss
> redmine320 curl
> redmine320 expat
> redmine320 fontconfig
> redmine320 freetype2
> redmine320 indexinfo
> ..
> ..
> 
> Now we need to switch all packages from testing repo "redmine320" to
> production repo "codelab".
> 
> Is there any other way instead of manual deinstall and reinstall of all
> those packages?
> 

# remove the "repository" annotation
pkg annotate -D expat repository

# add the new one
pkg annotate -A expat repository codelab

For convenience we could allow to overrite an existing one, but we do not yet

Best regards,
bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160628/77f84db6/attachment.sig>


More information about the freebsd-ports mailing list