Skip to content

Commit

Permalink
Makefiles: Use conditional installs to avoid duplications
Browse files Browse the repository at this point in the history
Previously some of the packages in the Makefiles were installed with
ignoring the exit code. In case there were the either or condition, the
second package might have been installed as well, even though it wasn't
necessary. This patch changes this by making it conditional, to install
the second package only if the first one failed.

Signed-off-by: Vinzenz Feenstra <[email protected]>
  • Loading branch information
vinzenz authored and pirat89 committed Nov 23, 2021
1 parent 16bf268 commit eab3cf3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
install-deps:
yum install -y policycoreutils
-yum install -y policycoreutils-python
-yum install -y python3-policycoreutils
yum install -y policycoreutils policycoreutils-python || yum install -y policycoreutils python3-policycoreutils

Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
install-deps:
yum install -y policycoreutils
-yum install -y policycoreutils-python
-yum install -y python3-policycoreutils
yum install -y policycoreutils policycoreutils-python || yum install -y policycoreutils python3-policycoreutils
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
install-deps:
yum install -y policycoreutils
-yum install -y policycoreutils-python
-yum install -y python3-policycoreutils
yum install -y policycoreutils policycoreutils-python || yum install -y policycoreutils python3-policycoreutils
4 changes: 1 addition & 3 deletions repos/system_upgrade/common/actors/systemfacts/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
install-deps:
yum install -y kmod procps-ng policycoreutils findutils
-yum install -y libselinux-python
-yum install -y python3-libselinux
yum install -y kmod procps-ng policycoreutils findutils libselinux-python || yum install -y kmod procps-ng policycoreutils findutils python3-libselinux

0 comments on commit eab3cf3

Please sign in to comment.