Will RPM packages ever be fixed?

When trying to remove OB2 RPM packets manually, it turned out that ther eis a dependency bug. Searching the forum before asking, I realized that this bug goies back to version 9 at least.

What I did was:

# rpm -qa OB2\*
OB2-CMNUTILS-23.4-1.x86_64
OB2-CORE-23.4-1.x86_64
OB2-AUTODR-23.4-1.x86_64
OB2-DA-23.4-1.x86_64
OB2-TS-CORE-23.4-1.x86_64


# rpm -ve OB2-CMNUTILS-23.4-1.x86_64 OB2-CORE-23.4-1.x86_64 OB2-AUTODR-23.4-1.x86_64 OB2-DA-23.4-1.x86_64 OB2-TS-CORE-23.4-1.x86_64
Preparing packages...
OB2-DA-23.4-1.x86_64
OB2-AUTODR-23.4-1.x86_64
OB2-CMNUTILS-23.4-1.x86_64
[ERROR]: No xinetd/systemd/inetd configuration found!
OB2-CORE-23.4-1.x86_64
ERROR: Cannot find /opt/omni//bin/omnicc
error: %preun(OB2-TS-CORE-23.4-1.x86_64) scriptlet failed, exit status 3
error: OB2-TS-CORE-23.4-1.x86_64: erase failed


# rpm -q --requires OB2-TS-CORE-23.4-1.x86_64
/bin/sh
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsLzma) <= 4.4.6-1


# rpm -ql OB2-TS-CORE-23.4-1.x86_64
/opt/omni
/opt/omni/.CII_TS_CORE
/opt/omni/.patch_ts_core
/opt/omni/bin
/opt/omni/bin/perl
/opt/omni/lbin
/opt/omni/lbin/omnigencertss.pl
/opt/omni/lib
/opt/omni/lib/perl
/opt/omni/lib/perl/site_perl.tar
/opt/omni/lib64
/opt/omni/lib64/libboost_date_time.so.1.65.0
/opt/omni/lib64/libboost_filesystem.so.1.65.0
/opt/omni/lib64/libboost_iostreams.so.1.65.0
/opt/omni/lib64/libboost_program_options.so.1.65.0
/opt/omni/lib64/libboost_regex.so.1.65.0
/opt/omni/lib64/libboost_serialization.so.1.65.0
/opt/omni/lib64/libboost_signals.so.1.65.0
/opt/omni/lib64/libboost_system.so.1.65.0
/opt/omni/lib64/libboost_thread.so.1.65.0
/opt/omni/lib64/libcurl.so
/opt/omni/lib64/libgcc_s.so.1
/opt/omni/lib64/libstdc++.so.6
/opt/omni/lib64/libstdc++.so.6.0.28
/opt/omni/newconfig
/opt/omni/newconfig/etc
/opt/omni/newconfig/etc/opt
/opt/omni/newconfig/etc/opt/omni
/opt/omni/newconfig/etc/opt/omni/client
/opt/omni/newconfig/etc/opt/omni/client/customize
/opt/omni/newconfig/etc/opt/omni/client/customize/.VersionTS_CORE

So the pre-uninstall script of OB2-TS-CORE-23.4-1.x86_64 uses /opt/omni/bin/omnicc, but it does not provide that command, nor does it require the package that provides that command.

Basically that means that the RPM packages are not correct, because otherwise the RPM manager would uninstall the packets in the correct order.

OTOH if OB2-TS-CORE is the base packet, and if there are cyclic packet dependencies, the whole design of the packet structure is just broken.

Looking at the "preun" script itself showed that the script is using unsafe temporary files (see https://www.netmeister.org/blog/mktemp.html for example).

And the double slash is from patterns like

OMNIHOME=/opt/omni/

${OMNIHOME}/bin/omnicc

What the script tries to do is removing "ts_core" component information in the CM, it seems:

OUTPUT=`call_omnicc -remove_component_str $PAC $OMNIFORMAT $OMNIINFO 2>&1`
call_omnicc -update_host ${HOSTNAME}
Calling the command with no scripts being executed removed the package:
# rpm -ve --noscripts OB2-TS-CORE-23.4-1.x86_6

After having reinstalled the software, I found out that OB2-CORE provides the binary:

# rpm -qf /opt/omni/bin/omnicc
OB2-CORE-23.4-1.x86_64

So if OB2-TS-CORE would require OB2-CORE, the uninstall would succeed.