> On Aug 20, 2025, at 5:33 AM, Dag-Erling Smørgrav <[email protected]> wrote:
>
> Miroslav Lachman <[email protected]> writes:
>> If there is one file for each repository, it can be managed using
>> simple tools such as cp / rm / sed to enable, disable or modify
>> repositories - good for scripted setups and automation.
>
> The correct way to disable one of these repositories is to add
>
> repository-name: { enabled: false }
>
> in a file in /usr/local/etc/pkg/repos.
It’s unclear (to me) whether that’s the *correct* way, or the *recommended* way
(pkg(8) calls it “a common idiom”), and in either case *why* is that the
recommended/correct way: what breaks if one modifies /etc/FreeBSD.conf ? Why
does it break?
It feels very unnatural to me to have one file in /etc specifying a setting
(enabled: true”), and another file in /usr/local/etc specifying the opposite.
Also, it seems that whether having “repository-name: { enabled: false}” would
actually disable respository-name would depend on the order of directories in
the configuration variable REPOS_DIR. This feels quite brittle.
Thanks,
Matteo