From: Alfredo Deza Date: Wed, 11 May 2016 12:08:48 +0000 (-0400) Subject: ceph-build: map the DIST to distro to properly detect ubuntu vs debian X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F389%2Fhead;p=ceph-build.git ceph-build: map the DIST to distro to properly detect ubuntu vs debian Signed-off-by: Alfredo Deza --- 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() {