pkg: found job scheduling cycle without upgrade job
Hi, I am facing an issue with the new scheduler in pkg 2. The context is :
- I use packer to build an image of FreeBSD
- A disk is mounted on /mnt and a new OS is installed on it
- Was working flawlessly with pkg < 2.0.0
- The following is working great:
chroot /mnt/ env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} - As soon as I install our custom packages:
chroot /mnt/ env ASSUME_ALWAYS_YES=yes /usr/sbin/pkg install -y vulture-base vulture-gui
Updating Vulture repository catalogue...
Vulture repository is up to date.
All repositories are up to date.
The following 5 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
vulture-base: 2.1.14
vulture-crontabs: 0.2.6
vulture-haproxy: 1.4.3
vulture-mongodb: 0.9_3
vulture-rsyslog: 1.7.2
Number of packages to be installed: 5
The process will require 156 MiB more space.
30 MiB to be downloaded.
[1/5] Fetching vulture-crontabs-0.2.6.pkg: . done
[2/5] Fetching vulture-rsyslog-1.7.2.pkg: .......... done
[3/5] Fetching vulture-base-2.1.14.pkg: ......... done
[4/5] Fetching vulture-haproxy-1.4.3.pkg: .......... done
[5/5] Fetching vulture-mongodb-0.9_3.pkg: . done
Checking integrity... done (0 conflicting)
pkg: found job scheduling cycle without upgrade job
This crash prevent our package installation
And for some packages, it prints:
pkg: Package database is busy while closing!
But result in a successful installation
I suspect a breaking change with POST_INSTALL scripts, do you have some tips to resolve my issue please ?
The problem is caused by circular dependencies in the packages you are trying to install. Circular dependencies are not supported by pkg.
See also: https://github.com/freebsd/pkg/issues/2332
Thanks for your really fast and spot on answer, I will fix that !
The error message could probably be better here. In an ideal world, the solver would probably catch this before things made it to the job scheduler.
And for the other error message:
pkg: Package database is busy while closing!
Do you have any clue ?
the pkg: Package database is busy while closing! was a pkg bug which has been fixed in 2.2.*