X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cf569180b5121c1d2210a0fc1aa986e207d09af3..836a871b3a985e74004d709de8ca80db7705180c:/build/go-python-package-scripts/prerm diff --git a/build/go-python-package-scripts/prerm b/build/go-python-package-scripts/prerm index 26baa62aa1..c0f45d60c6 100755 --- a/build/go-python-package-scripts/prerm +++ b/build/go-python-package-scripts/prerm @@ -1,8 +1,13 @@ #!/bin/sh +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 set -e -if [ "%{name}" != "%\{name\}" ]; then +# Detect rpm-based systems: the exit code of the following command is zero +# on rpm-based systems +if /usr/bin/rpm -q -f /usr/bin/rpm >/dev/null 2>&1; then # Red Hat ("%{...}" is interpolated at package build time) pkg="%{name}" pkgtype=rpm