RPMs can install out of order when they are installed as part of a single transaction. For example, if you have a previous version of Open GEE installed and then run:
yum will only ensure that the state is consistent at the end of the transaction, not during the transaction. Thus, the RPMs could install in the order opengee-common, opengee-server, opengee-postgis. This is a problem if common upgrades a library that's not compatible with the older version of postgis because server relies on postgis in its post-install script, and postgis will not be in a working state (due to the incompatibility with the newer version of common).
This problem also occurs with opengee-extra, but it is harder to fix because extra can be installed in any order relative to the other RPMs, but it relies on Fusion and Server working if they have been installed previously. Thus, if you have an old version of Open GEE installed and opengee-common upgrades a library that is incompatible with an older version of opengee-postgis, you will have a problem in this scenario:
The install will fail because postgis (and therefore opengee-server) will be in a non-working state after the opengee-common upgrade, causing the opengee-extra post-install script to fail.
To Reproduce
There are two related problems here and both are difficult to reproduce. The first depends on the behavior of yum, and both depend on upgrading to a new version of a library. For an example of code that upgrades a library, see https://github.com/google/earthenterprise/pull/1897/files.
Problem 1:
Install Open GEE 5.3.7 or before from RPMs
Create Open GEE RPMs that upgrade a library (such as in the PR above)
Install the new version of Open GEE using yum install opengee-common opengee-postgis opengee-server opengee-fusion
If yum installs the RPMs in the order opengee-common, opengee-server, opengee-postgis (which is not forbidden), the opengee-server post-install script will fail.
Problem 2:
Install Open GEE 5.3.7 or before from RPMs
Create Open GEE RPMs that upgrade a library (such as in the PR above)
Install the new opengee-common RPM
Install the new opengee-extra RPM. Note that the post-install script fails
Expected behavior
RPMs are forced to install in a supported order, even if they are installed/upgraded in a single transaction
The opengee-extra RPM installs without failing no matter the install/upgrade order
Describe the bug
RPMs can install out of order when they are installed as part of a single transaction. For example, if you have a previous version of Open GEE installed and then run:
yum will only ensure that the state is consistent at the end of the transaction, not during the transaction. Thus, the RPMs could install in the order opengee-common, opengee-server, opengee-postgis. This is a problem if common upgrades a library that's not compatible with the older version of postgis because server relies on postgis in its post-install script, and postgis will not be in a working state (due to the incompatibility with the newer version of common).
This problem also occurs with opengee-extra, but it is harder to fix because extra can be installed in any order relative to the other RPMs, but it relies on Fusion and Server working if they have been installed previously. Thus, if you have an old version of Open GEE installed and opengee-common upgrades a library that is incompatible with an older version of opengee-postgis, you will have a problem in this scenario:
The install will fail because postgis (and therefore opengee-server) will be in a non-working state after the opengee-common upgrade, causing the opengee-extra post-install script to fail.
To Reproduce
There are two related problems here and both are difficult to reproduce. The first depends on the behavior of yum, and both depend on upgrading to a new version of a library. For an example of code that upgrades a library, see https://github.com/google/earthenterprise/pull/1897/files.
Problem 1:
yum install opengee-common opengee-postgis opengee-server opengee-fusion
Problem 2:
Expected behavior