X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cf569180b5121c1d2210a0fc1aa986e207d09af3..490aaa38ccb260f94e2ee25e7c6a50c982da35ae:/build/go-python-package-scripts/postinst diff --git a/build/go-python-package-scripts/postinst b/build/go-python-package-scripts/postinst index 729855a880..ab2568ab9b 100755 --- a/build/go-python-package-scripts/postinst +++ b/build/go-python-package-scripts/postinst @@ -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