Fix the test so it works for RHEL<9 as well
Before RHEL-9 the minizip-compat-devel package was named minizip-devel Also since F38 the minizip package was renamed to minizip-ng so we cannot check for the minizip-devel package using the 'rpm -q' because it will always fail and not remove the package
This commit is contained in:
parent
ec780b6475
commit
1e3c9243a8
1 changed files with 12 additions and 4 deletions
|
|
@ -30,13 +30,21 @@
|
|||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
PACKAGE="zlib"
|
||||
MINIZIP_PACKAGE="minizip-compat-devel"
|
||||
if rlIsRHEL '<9'; then
|
||||
MINIZIP_PACKAGE="minizip-devel"
|
||||
fi
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "rpm -q minizip-devel && yum remove minizip-devel -y" 0,1
|
||||
rlRun "rpm -q minizip-compat-devel || yum install minizip-compat-devel -y"
|
||||
rlAssertRpm $PACKAGE
|
||||
rlAssertRpm minizip-compat-devel
|
||||
# Since RHEL-9 the minizip-devel was replaced by minizip-compat-devel
|
||||
# so we need to remove it before installing the compat package
|
||||
# they conflict with each other
|
||||
if ! rlIsRHEL '<9' ; then
|
||||
rlRun "yum remove minizip-devel -y" 0,1
|
||||
rlRun "rpm -q $MINIZIP_PACKAGE || yum install $MINIZIP_PACKAGE -y"
|
||||
fi
|
||||
rlAssertRpm $MINIZIP_PACKAGE
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "tar -C $TmpDir -xzf minizip.tar.gz"
|
||||
rlRun "pushd $TmpDir"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue