Solved poudriere with system major version upgrade

Hi All.

I known rebuild all of ports when system major version upgrade.
And I using ports-mgmt/portmaster and migrate to ports-mgmt/poudriere

I collected some method..
  1. poudriere bulk -c -f [Build ports listed]
  2. Remove local repository /usr/local/poudriere/data/packages/[BARFOO] directly.
  3. Other?
Above method tested, execute rebuild all of ports OK, but pkg install [PORTS] replied The most recent versions of packages are already installed , did not install latest rebuild package
Is pkg install -f [PORTS] correct method ?

Which one better or correct or other method suggestion?

Thanks very much.
 
You need to tell pkg where is located your local repository.

This is how it looks like by me:
Code:
phil@jupiter ~$ cat /usr/local/etc/pkg/repos/FreeBSD.conf

# To disable a repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file, e.g.:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD-ports: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#   echo "FreeBSD-ports-kmods: { enabled: no }" >> /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: no,
  priority: 10
}
custom: {
    url: "file:///usr/local/poudriere/data/packages/amd64-current-current",
    enabled: yes,
    priority: 20
}
FreeBSD-ports-kmods: {
  enabled: no
}

After this I use pkg as usual (update / upgrade / install)
 
For rebuild all of package.
This is not necessary, poudriere will delete them by default.
Have a look at poudriere.conf

Example:
Code:
# Keep older package repositories. This can be used to rollback a system
# or to bisect issues by changing the repository to one of the older
# versions and reinstalling everything with `pkg upgrade -f`
# ATOMIC_PACKAGE_REPOSITORY is required for this.
# Default: no
#KEEP_OLD_PACKAGES=no
KEEP_OLD_PACKAGES=yes
 
# How many old package repositories to keep with KEEP_OLD_PACKAGES
# Default: 5
#KEEP_OLD_PACKAGES_COUNT=5
KEEP_OLD_PACKAGES_COUNT=3
 
This is not necessary, poudriere will delete them by default.
Have a look at poudriere.conf

Example:
Code:
# Keep older package repositories. This can be used to rollback a system
# or to bisect issues by changing the repository to one of the older
# versions and reinstalling everything with `pkg upgrade -f`
# ATOMIC_PACKAGE_REPOSITORY is required for this.
# Default: no
#KEEP_OLD_PACKAGES=no
KEEP_OLD_PACKAGES=yes
 
# How many old package repositories to keep with KEEP_OLD_PACKAGES
# Default: 5
#KEEP_OLD_PACKAGES_COUNT=5
KEEP_OLD_PACKAGES_COUNT=3
After poudriere bulk -c -f [Build ports listed], execute pkg upgrade -f will reinstall all of packages.

Thanks you.
 
For rebuild all of package.
The -c option already forces this.
Code:
     -c       Clean all previously built packages and logs.
poudriere-bulk(8)

It's useful to add a couple of symlinks in the /usr/local/poudriere/data/packages/ directory:
Code:
% ll /usr/local/poudriere/data/packages/
total 70
drwxr-xr-x  3 root wheel 17 Sep  8 18:41 14-stable-desktop/
drwxr-xr-x  3 root wheel 17 Sep 22 08:23 142-release-desktop/
drwxr-xr-x  4 root wheel 18 Aug 25 09:31 142-release-server/
drwxr-xr-x  3 root wheel 15 Dec 14 16:53 143-release-desktop/
drwxr-xr-x  3 root wheel 15 Dec 14 16:52 143-release-server/
drwxr-xr-x  3 root wheel 15 Dec 14 16:54 15-stable-desktop/
drwxr-xr-x  3 root wheel 15 Dec 14 16:50 15-stable-server/
drwxr-xr-x  3 root wheel 15 Dec 14 21:17 150-release-server/
lrwxr-xr-x  1 root wheel 18 Jun 28 10:45 FreeBSD:14:amd64@ -> 143-release-server
lrwxr-xr-x  1 root wheel 18 Dec  7 22:27 FreeBSD:15:amd64@ -> 150-release-server
drwxr-xr-x  2 root wheel  4 Dec  7 22:27 desktop/
drwxr-xr-x  2 root wheel  4 Dec  7 22:26 server/

Then you can simply use url: "file:///usr/local/poudriere/data/packages/${ABI}" for the package repository URL, and don't have to switch 'manually'.
 
The -c option already forces this.
Code:
     -c       Clean all previously built packages and logs.
poudriere-bulk(8)

It's useful to add a couple of symlinks in the /usr/local/poudriere/data/packages/ directory:
Code:
% ll /usr/local/poudriere/data/packages/
total 70
drwxr-xr-x  3 root wheel 17 Sep  8 18:41 14-stable-desktop/
drwxr-xr-x  3 root wheel 17 Sep 22 08:23 142-release-desktop/
drwxr-xr-x  4 root wheel 18 Aug 25 09:31 142-release-server/
drwxr-xr-x  3 root wheel 15 Dec 14 16:53 143-release-desktop/
drwxr-xr-x  3 root wheel 15 Dec 14 16:52 143-release-server/
drwxr-xr-x  3 root wheel 15 Dec 14 16:54 15-stable-desktop/
drwxr-xr-x  3 root wheel 15 Dec 14 16:50 15-stable-server/
drwxr-xr-x  3 root wheel 15 Dec 14 21:17 150-release-server/
lrwxr-xr-x  1 root wheel 18 Jun 28 10:45 FreeBSD:14:amd64@ -> 143-release-server
lrwxr-xr-x  1 root wheel 18 Dec  7 22:27 FreeBSD:15:amd64@ -> 150-release-server
drwxr-xr-x  2 root wheel  4 Dec  7 22:27 desktop/
drwxr-xr-x  2 root wheel  4 Dec  7 22:26 server/

Then you can simply use url: "file:///usr/local/poudriere/data/packages/${ABI}" for the package repository URL, and don't have to switch 'manually'.
Hi SirDice

Thanks your good suggestion, I got it.
 
Back
Top