]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-build: fix deb and rpm validate 1355/head
authorKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Thu, 1 Aug 2019 22:04:37 +0000 (00:04 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@gmail.com>
Fri, 2 Aug 2019 16:46:07 +0000 (18:46 +0200)
validate_deb - not redhat does not mean it is deb distro,
there can be other packaging systems
validate_rpm - we do not want to proceed for zypper based,
we only want to proceed for redhat like repo

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
ceph-dev-build/build/validate_deb
ceph-dev-build/build/validate_rpm

index 0322b47a8899131fbf55f0b7969167bfa9c269ab..95367d693733d0b714e2dfa91063803ad7c826aa 100644 (file)
@@ -2,6 +2,12 @@
 set -ex
 
 # Only do actual work when we are a DEB distro
-if test -f /etc/redhat-release ; then
-    exit 0
-fi
+( source /etc/os-release
+  case $ID in
+    debian|ubuntu)
+      exit 0
+      ;;
+    *)
+      exit 1
+      ;;
+  esac) || exit 0
index 17b41482618cfaec601e530e41b5b18458d775a9..1d96168fb8aca9970b36b0a1196dbb47071c8c46 100644 (file)
@@ -2,6 +2,12 @@
 set -ex
 
 # only do work if we are a RPM distro
-if [[ ! -f /etc/redhat-release && ! -f /usr/bin/zypper ]] ; then
-    exit 0
-fi
+( source /etc/os-release
+  case $ID in
+    centos|rhel|fedora)
+      exit 0
+      ;;
+    *)
+      exit 1
+      ;;
+  esac) || exit 0