]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build: map the DIST to distro to properly detect ubuntu vs debian 389/head
authorAlfredo Deza <adeza@redhat.com>
Wed, 11 May 2016 12:08:48 +0000 (08:08 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 11 May 2016 12:56:33 +0000 (08:56 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-build/build/build_deb

index 49acb189eab41485e9ae50319b705e34d3937752..f9fb39dfa696b5e06914d12495eb4a847662d0ef 100644 (file)
@@ -35,7 +35,21 @@ BPTAG=`get_bptag $DIST`
 [ "$RC" = true ] && chacra_ref="$BRANCH-rc" || chacra_ref="$BRANCH"
 [ "$TEST" = true ] && chacra_ref="test"
 vers=`cat ./dist/version`
-distro=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"`
+
+# We used to detect the $distro variable by inspecting at the host, but this is
+# not accurate because we are using pbuilder and just ubuntu to build
+# everything. That would cause POSTing binaries to incorrect chacra endpoints
+# like project/ref/ubuntu/jessie/.
+distro=""
+case $DIST in
+    jessie|wheezy)
+        distro="debian"
+        ;;
+    *)
+        distro="ubuntu"
+        ;;
+esac
+
 debian_version=${vers}-1
 
 gen_debian_version() {