[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Drop alternative when conditional dependency



  Trying to add an alternative build dependency on debian-installer:

    module-init-tools [linux-any] | kmod [linux-any]

  It breaks buildscript logic, as regex parsing dpkg-checkbuilddeps
  output does not support alternatives.

  This patch drops alternatives from the output of packages listed
  by dpkg-checkbuilddeps.

Signed-off-by: Hector Oron <hector.oron@gmail.com>
---
 buildscript |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/buildscript b/buildscript
index f305eac..7a97b62 100755
--- a/buildscript
+++ b/buildscript
@@ -59,7 +59,7 @@ install_build_deps() {
   schroot -c "$SID" -d /build -u root -r -- apt-get update
   (
     LANG=C schroot -q -c "$SID" -d "/build/$(basename "$INSTALLER_DIR")/checkout/build" -p -r -- dpkg-checkbuilddeps -B ../debian/control 2>&1 || true
-  ) | sed -e 's%dpkg-checkbuilddeps: Unmet build dependencies: %%' -e 's, *([^)]*),,g' \
+  ) | sed -e 's%dpkg-checkbuilddeps: Unmet build dependencies: %%' -e 's, *([^)]*),,g' -e 's/|[[:blank:]]\{1,\}[^[:blank:]]*//g' \
     | DEBIAN_PRIORITY=critical DEBIAN_FRONTEND=noninteractive xargs schroot -c "$SID" -d "/build/$(basename "$INSTALLER_DIR")/checkout/build" -u root -p -r -- apt-get -y --no-install-recommends install
 }
 
-- 
1.7.9.1


Reply to: