projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
15694: Catch exception from get_current_container in runtime_status_update
[arvados.git]
/
build
/
go-python-package-scripts
/
prerm
diff --git
a/build/go-python-package-scripts/prerm
b/build/go-python-package-scripts/prerm
index 26baa62aa1b74266fd853062e5cb25bb4ec6a93d..c0f45d60c698cb77f9c2472d7d18b5d3715b33c9 100755
(executable)
--- a/
build/go-python-package-scripts/prerm
+++ b/
build/go-python-package-scripts/prerm
@@
-1,8
+1,13
@@
#!/bin/sh
#!/bin/sh
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
set -e
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
# Red Hat ("%{...}" is interpolated at package build time)
pkg="%{name}"
pkgtype=rpm