From 5d10f6e7136c36b51bcfa361d6269aef864881f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 11 Sep 2018 10:07:03 +0000 Subject: [PATCH] fix installation check after package build --- ax_init_standard_project.m4 | 22 ++++++++-------------- build-in-docker.sh | 11 ++++++----- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index c806f13..39b798c 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -867,7 +867,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [ DEV_DIST_PKG= pkg=m4_default([$2], [$1]) $6 - dep_pkg=${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-dev} + deb_pkg=${DEV_DEB_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-dev} rpm_pkg=${DEV_RPM_DIST_PKG:-${DEV_DIST_PKG:-${pkg}}-devel} if test -n "$4"; then for f in $pkg $4; do @@ -1092,24 +1092,21 @@ AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [ # - parameter: # $1 = package name AC_DEFUN([AX_DEB_BUILD_DEPEND], [ - pkg="$1" - DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg}" + DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, $1" ]) # require package in debian/control.in append @DEB_DEPEND@ to Depends # - parameter: # $1 = package name AC_DEFUN([AX_DEB_DEPEND], [ - pkg="$1" - DEB_DEPEND="${DEB_DEPEND}, ${pkg}" + DEB_DEPEND="${DEB_DEPEND}, $1" ]) # require package in debian/control.in append @DEB_DEPEND@ to Depends # - parameter: # $1 = package name AC_DEFUN([AX_DEB_SECTION], [ - pkg="$1" - DEB_SECTION="${pkg}" + DEB_SECTION="$1" ]) # call after setting debian dependencies @@ -1141,19 +1138,17 @@ AC_DEFUN([AX_RPM_DEPEND_IFEXISTS], [ # - parameter: # $1 = package name AC_DEFUN([AX_RPM_BUILD_DEPEND], [ - pkg="$1" - RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" + RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, $1" ]) # require package in .spec.in append @RPM_DEPEND@ to Depends # - parameter: # $1 = package name AC_DEFUN([AX_RPM_DEPEND], [ - pkg="$1" if test -z "${RPM_DEPEND}"; then - RPM_DEPEND="${pkg}" + RPM_DEPEND="$1" else - RPM_DEPEND="${RPM_DEPEND}, ${pkg}" + RPM_DEPEND="${RPM_DEPEND}, $1" fi ]) @@ -1161,8 +1156,7 @@ AC_DEFUN([AX_RPM_DEPEND], [ # - parameter: # $1 = package name AC_DEFUN([AX_RPM_GROUP], [ - pkg="$1" - RPM_GROUP="${pkg}" + RPM_GROUP="$1" ]) # call after setting rpmian dependencies diff --git a/build-in-docker.sh b/build-in-docker.sh index 182fb75..b544b47 100755 --- a/build-in-docker.sh +++ b/build-in-docker.sh @@ -344,12 +344,13 @@ done docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -t "${targets}" ${host} "${FLAGS[@]}" # last check: try to install built deb or rpm files (if not already cleaned up) -if test "${targets//deb/}" != "${targets}"; then - if ls *.deb > /dev/null 2> /dev/null; then - docker exec ${DOCKER_ID} bash -c "apt-get install ${OPTIONS} ${PREVENT} /workdir/*.deb" - fi +# not supported in trusty and jessie +if test "$mode" = deb -a "${img//trusty/}" = "${img}" -a "${img//jessie/}" = "${img}"; then + if test "${targets//deb/}" != "${targets}" && ls *.deb > /dev/null 2> /dev/null; then + docker exec ${DOCKER_ID} bash -c "apt-get install ${OPTIONS} ${PREVENT} /workdir/*.deb" + fi fi -if test "${targets//rpm/}" != "${targets}"; then +if test "$mode" = rpm -a "${targets//rpm/}" != "${targets}"; then if ls *.rpm > /dev/null 2> /dev/null; then docker exec ${DOCKER_ID} bash -c "${INSTALL_TOOL} /workdir/*.rpm" fi