Re: pkg 2.7.3: "pkg update -rFreeBSD-base" still reports "No repositories are enabled." instead of just updating FreeBSD-base when FreeBSD-base is "enabled: no" (2.7.4 fix intended)
Date: Thu, 16 Apr 2026 17:56:30 UTC
On 4/15/26 18:45, Mark Millard wrote:
> From my https://github.com/freebsd/pkg/issues/2643 submittal:
>
> # pkg update -rFreeBSD-base
> No repositories are enabled.
>
> # pkg-static update -rFreeBSD-base
> No repositories are enabled.
This turned out to be pkg 2.7.3 mishandling the use of:
# cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD-base: { enabled: no }
FreeBSD-ports: { enabled: no }
FreeBSD-ports-kmods: { enabled: no }
Those lines should have disabled the 3 but instead deleted them
internally: net result as if the 3 had never been present in
/etc/FreeBSD.conf .
When pkg 2.7.4 shows up the above issue should have been fixed in it.
As stands, a workaround is to put the "no"s into the original file,
replacing the "yes"s. It is the split across files to override the
definitions that leads to the issue in 2.7.3 .
>
>
> For reference:
>
> # pkg -v
> 2.7.3
>
> # pkg-static -v
> 2.7.3
>
> # head /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf
> ==> /etc/pkg/FreeBSD.conf <==
> #
> # To disable a repository, instead of modifying or removing this file,
> # create or edit /usr/local/etc/pkg/repos/FreeBSD.conf, 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
> #
> # Note that the FreeBSD-base repository is disabled by default.
> #
>
> ==> /usr/local/etc/pkg/repos/FreeBSD.conf <==
> FreeBSD-base: { enabled: no }
> FreeBSD-ports: { enabled: no }
> FreeBSD-ports-kmods: { enabled: no }
>
> # man pkg-update
> PKG-UPDATE(8) FreeBSD System Manager's Manual
> PKG-UPDATE(8)
>
> NAME
> pkg update – update the local catalogues of the enabled package
> repositories
>
> SYNOPSIS
> pkg update [-fq] [-r reponame ...]
>
> pkg update [--{force,quiet}] [--repository reponame ...]
>
> . . .
>
> OPTIONS
> The following options are supported by pkg update:
>
> . . .
>
> -r reponame, --repository reponame
> Download the catalogue for the named repository only. This
> option
> can be specified multiple times to update several repositories.
> This will update only the named repositories, irrespective
> of the
> configured “enabled” status from repo.conf.
> . . .
>
> Note: All /usr/local/etc/pkg/repos/* have all the repositories with
> "enabled: no": configured for there being no defaultrepository.
>
>
--
===
Mark Millard
marklmi at yahoo.com