From 5c57831fcc7ba3d8709166f7fddfc755e20fe597 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 11 May 2016 08:08:48 -0400 Subject: [PATCH] ceph-build: map the DIST to distro to properly detect ubuntu vs debian Signed-off-by: Alfredo Deza --- ceph-build/build/build_deb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ceph-build/build/build_deb b/ceph-build/build/build_deb index 49acb189..f9fb39df 100644 --- a/ceph-build/build/build_deb +++ b/ceph-build/build/build_deb @@ -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() { -- 2.39.5