From 57ba7e0aed2eee89cf02a6c08821a7015abb89a2 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 13 Aug 2012 23:12:34 +0200 Subject: [PATCH] Set ARCH/BASE/DIST in dist_and_arch_settings() also for PROVIDE_ONLY runs --- scripts/build-and-provide-package | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/build-and-provide-package b/scripts/build-and-provide-package index a61cb22..a5921cb 100755 --- a/scripts/build-and-provide-package +++ b/scripts/build-and-provide-package @@ -160,8 +160,22 @@ identify_sourcefile() { } dist_and_arch_settings() { + if [ -n "${distribution:-}" ] ; then + DIST="-${distribution}" + fi + + if [ -z "${architecture:-}" ] || [ "${architecture:-}" = "all" ] ; then + echo "*** No architecture set or architecture set to 'all', using system arch for cowbuilder ***" + ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)" + BASE="/var/cache/pbuilder/base${DIST:-}.cow" + else + echo "*** Using cowbuilder base for architecture ${architecture} ***" + ARCH="${architecture}" + BASE="/var/cache/pbuilder/base${DIST:-}-${architecture}.cow" + fi + if [ -n "${PROVIDE_ONLY:-}" ] ; then - echo "*** Config variable 'PROVIDE_ONLY' is set, ignoring request to run dist_and_arch_settings() ***" + echo "*** Config variable 'PROVIDE_ONLY' is set, not considering COWBUILDER_DIST ***" return 0 fi @@ -180,20 +194,6 @@ dist_and_arch_settings() { COWBUILDER_DIST="${distri_codename}" fi fi - - if [ -n "${distribution:-}" ] ; then - DIST="-${distribution}" - fi - - if [ -z "${architecture:-}" ] || [ "${architecture:-}" = "all" ] ; then - echo "*** No architecture set or architecture set to 'all', using system arch for cowbuilder ***" - ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)" - BASE="/var/cache/pbuilder/base${DIST:-}.cow" - else - echo "*** Using cowbuilder base for architecture ${architecture} ***" - ARCH="${architecture}" - BASE="/var/cache/pbuilder/base${DIST:-}-${architecture}.cow" - fi } cowbuilder_init() {