Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build scripts: Enable dnf for Fedora >= 22 #11105

Merged
merged 1 commit into from Sep 19, 2016

Conversation

badone
Copy link
Contributor

@badone badone commented Sep 16, 2016

The use of yum triggers a warning and reference to yum2dnf on Fedora >= 22.
Use either yum or dnf based on the Fedora version.

Signed-off-by: Brad Hubbard bhubbard@redhat.com

The use of yum triggers a warning and reference to yum2dnf on Fedora >= 22.
Use either yum or dnf based on the Fedora version.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
$SUDO yum install -y redhat-lsb-core
yumdnf="yum"
builddepcmd="yum-builddep -y"
if test "$(echo "$VERSION_ID >= 22" | bc)" -ne 0; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also put

if [ $((VERSION_ID >= 22)) -eq 1 ]; then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try it with rhel or CentOS where VERSION_ID may be something like "7.2". Bash is not good at doing float/int comparisons

@tchaikov tchaikov self-assigned this Sep 19, 2016
@tchaikov tchaikov merged commit c79ca73 into ceph:master Sep 19, 2016
@badone badone deleted the wip-dnf-enable-build-scripts branch September 21, 2016 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants