Infinite cycle installing and removing java-zoneinfo

Hi all,

Recently, I've been getting an infinite cycle of installing/uninstalling java-zoneinfo. Why is it happening and how can I break this cycle?
pkg query %ro java-zoneinfo shows no reverse dependencies.

Example:
Code:
❯ doas pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (225 candidates): 100%
Processing candidates (225 candidates): 100%
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    java-zoneinfo: 2021.e [FreeBSD]

Number of packages to be installed: 1

Proceed with this action? [y/N]: y
[1/1] Installing java-zoneinfo-2021.e...
[1/1] Extracting java-zoneinfo-2021.e: 100%
❯ doas pkg autoremove
Password:
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages:

Installed packages to be REMOVED:
    java-zoneinfo: 2021.e

Number of packages to be removed: 1

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling java-zoneinfo-2021.e...
[1/1] Deleting files for java-zoneinfo-2021.e: 100%
❯ doas pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (225 candidates): 100%
Processing candidates (225 candidates): 100%
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    java-zoneinfo: 2021.e [FreeBSD]

Number of packages to be installed: 1

Proceed with this action? [y/N]:
 
  • Like
Reactions: drr
Why is it happening and how can I break this cycle?
[1/1] Installing java-zoneinfo-2021.e...
[1/1] Extracting java-zoneinfo-2021.e: 100%
❯ doas pkg autoremove
Why would you want to pkg-autoremove(8) immediate after installation of the package?

Probably one of the packages due for upgrade requires java/java-zoneinfo.

Is in the upgrade list one of the below packages listed? Do not doas pkg autoremove:
Code:
% pkg rquery %ro java-zoneinfo
java/openjdk8
java/openjdk8-jre

On my system:
Code:
% pkg info -r java-zoneinfo
java-zoneinfo-2021.e:
       openjdk8-8.452.09.1
% pkg info -r openjdk8
openjdk8-8.452.09.1:
        libreoffice-25.2.3.2_1 (libjawt.so)
 
  • Thanks
Reactions: drr
Why would you want to pkg-autoremove(8) immediate after installation of the package?

java-zoneinfo is scheduled to be installed on every pkg upgrade. I sometimes run pkg autoremove to remove packages that are no longer needed (not requested and not a runtime dependency of any other package). Somehow java-zoneinfo is considered not needed, but is a dependency of openjdk8 (which itself is a dependency of libreoffice). I don't understand this, may I don't understand autoremove.
 
  • Like
Reactions: drr
You can fix it with pkg set.
pkg-set(8)
Code:
-A 01, --automatic 01
                Set automatic flag for the package: 0 is not automatic, 1 is
                automatic.  This affects the operation of pkg-autoremove(8).
 
I've updated the repository configuration and it's no longer happening. It might have been related as I was overriding the same names FreeBSD and FreeBSD-kmods instead of disabling those and adding new ones for the latest packages. I'm not sure it was that, but today it seems ok.
The new /usr/local/etc/pkg/repos/FreeBSD.conf is the following:

Code:
FreeBSD: { enabled: no }

FreeBSD-kmods: { enabled: no }

FreeBSD-latest: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "SRV",
  signature_type: "FINGERPRINTS",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

FreeBSD-kmods-latest: {
  url: "pkg+https://pkg.freebsd.org/${ABI}/kmods_latest_${VERSION_MINOR}",
  mirror_type: "SRV",
  signature_type: "FINGERPRINTS",
  fingerprints: "/usr/share/keys/pkg",
  priority: 1,
  enabled: yes
}
 
I've updated the repository configuration and it's no longer happening. It might have been related as I was overriding the same names FreeBSD and FreeBSD-kmods instead of disabling those and adding new ones for the latest packages. I'm not sure it was that, but today it seems ok.

It is probably not related to pkg repository configuration; I do not have any custom repository configuration and I still get 'java-zoneinfo' removed in pkg autoremove and it gets installed again in a pkg upgrade.
 
I just noticed that running pkg upgrade immediately after removing 'java-zoneinfo' with a pkg autoremove does not install it again. It seems to get installed again only if another package is installed or upgraded. 'java-zoneinfo' gets installed again even when a package that does not depend on it is installed, as seen in the example below:

Code:
# pkg install elisa
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
elisa: 25.04.2
java-zoneinfo: 2021.e

Number of packages to be installed: 2

The process will require 6 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]:
 
Somehow java-zoneinfo is considered not needed, but is a dependency of openjdk8 (which itself is a dependency of libreoffice).

I recall openjdk17 being default or a req for libreoffice.

I've seen the java-zone loop thing with pkg autoremove too. I installed openjdk8 for jogl-amp (HD/OpenGL in a Java game).
 
Back
Top