The mysterious REPO_AUTOUPDATE option in pkg.conf

Do you use the REPO_AUTOUPDATE option?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 7 63.6%
  • Never heard of it

    Votes: 4 36.4%

  • Total voters
    11
By default invoking either of pkg install or pkg upgrade will cause repository catalogues to be updated automatically, unless disabled by setting REPO_AUTOUPDATE to false in pkg.conf(5).

I wondered if anyone uses pkg with the REPO_AUTOUPDATE option set to false and for what reason.
If you use pkg with that option disabled, please tell me why.
 
… Why would you want to set it to false?

Two use cases come to mind:
  1. an Internet connection is impossible, or unwanted
  2. pkg-upgrade(8) in single user mode.
As far as I can tell, the REPO_AUTOUPDATE configuration variable originated in relation to pkg-version(8):

  • fixed in pkg-1.1 in 2012.
 
I guess I'd say that I do "use" it, but I use it by not changing it. Rather, I just leave it set to true. Obviously that's not what you mean here, so I'll vote "no."
 
First of all, I wouldn't call something "feature creep" that amounts to just cleanly skipping some code based on a simple boolean flag.

The skipping is necessary anyways to make pkg commands dealing with remote repos work as an unprivileged user (without write permission to the local pkg databases).

A possible practical usecase is to avoid unnecessary requests when e.g. using pkg-rquery(8) a lot -- it doesn't make sense to check the remote repo each and every time. Of course, you can also use the commandline flag -U for that.
 
I suspect the main use case is to prevent a repo update upon pkg search. I usually forget to use the -U switch with that and then have to wait until the repo is updated, which can be rather annoying on a slow connection, especially if I only wanted to get an idea of what is available for a given keyword and didn't plan on installing anything (yet).
 
Back
Top