From cf74a6d772d54e5eb225756f03a98ecfc868f6f8 Mon Sep 17 00:00:00 2001
From: Tianon Gravi <admwiggin@gmail.com>
Date: Fri, 8 Feb 2019 15:44:20 -0800
Subject: [PATCH] Disable "merged-usr" for all official Debian builds for now
 (following the "buildd" variant switch)

As long as folks might use the "debian" Docker images to build software (which isn't common, but is definitely worth supporting), we should follow the "buildd" variant's lead on this point, especially since the benefits of merged-usr are much less pronounced in a Docker environment anyhow.

See also:

- https://bugs.debian.org/src:usrmerge ("dpkg-query" breaks, etc)
- https://bugs.debian.org/914208 ("buildd" variant disables merged-usr still)
- https://github.com/debuerreotype/docker-debian-artifacts/issues/60#issuecomment-461426406
---
 .travis.yml |  8 ++++----
 build.sh    | 12 +++++-------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a75c446..d454362 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,10 +4,10 @@ services: docker
 env:
     - SUITE=stable   CODENAME=jessie  TIMESTAMP=2017-01-01T00:00:00Z SHA256=c3f1697c699487382d5d15e4462c0e84b3069d3fc29ca100914c20258aa8ecc3
     - SUITE=jessie   CODENAME=        TIMESTAMP=2017-01-01T00:00:00Z SHA256=c3f1697c699487382d5d15e4462c0e84b3069d3fc29ca100914c20258aa8ecc3
-    - SUITE=testing  CODENAME=stretch TIMESTAMP=2017-01-01T00:00:00Z SHA256=c4e7b05a8a3e0d6af65b976bd249cc4a31ba301ebbea524b5412b5e07ae3b460
-    - SUITE=stretch  CODENAME=        TIMESTAMP=2017-01-01T00:00:00Z SHA256=c4e7b05a8a3e0d6af65b976bd249cc4a31ba301ebbea524b5412b5e07ae3b460
-    - SUITE=unstable CODENAME=sid     TIMESTAMP=2017-01-01T00:00:00Z SHA256=427a4be9f69b4bb24069f97b60e9a66d5d6f7c978b924afe3cdb868709756e93
-    - SUITE=sid      CODENAME=        TIMESTAMP=2017-01-01T00:00:00Z SHA256=427a4be9f69b4bb24069f97b60e9a66d5d6f7c978b924afe3cdb868709756e93
+    - SUITE=testing  CODENAME=stretch TIMESTAMP=2017-01-01T00:00:00Z SHA256=c0560f20a56c2fb95eb57af2712527fac436332278f3d15aa7f7cf78daa37797
+    - SUITE=stretch  CODENAME=        TIMESTAMP=2017-01-01T00:00:00Z SHA256=c0560f20a56c2fb95eb57af2712527fac436332278f3d15aa7f7cf78daa37797
+    - SUITE=unstable CODENAME=sid     TIMESTAMP=2017-01-01T00:00:00Z SHA256=42e0a87d11b5380d3985410d8c79b63b8b00e2dd074287df76ea7a91df5c2ffe
+    - SUITE=sid      CODENAME=        TIMESTAMP=2017-01-01T00:00:00Z SHA256=42e0a87d11b5380d3985410d8c79b63b8b00e2dd074287df76ea7a91df5c2ffe
     - SUITE=oldstable CODENAME=wheezy TIMESTAMP=2017-01-01T00:00:00Z SHA256=59387392aa63da1f77ea28be581a4b2d8e7e9720121d1d563a3f0cb4356f9856
     - SUITE=wheezy    CODENAME=       TIMESTAMP=2017-01-01T00:00:00Z SHA256=59387392aa63da1f77ea28be581a4b2d8e7e9720121d1d563a3f0cb4356f9856
     # EOL suites testing
diff --git a/build.sh b/build.sh
index 3315c9e..ec25b69 100755
--- a/build.sh
+++ b/build.sh
@@ -153,13 +153,11 @@ docker run \
 			fi
 			initArgs+=( --keyring "$keyring" )
 
-			releaseSuite="$(awk -F ": " "\$1 == \"Suite\" { print \$2; exit }" "$outputDir/Release")"
-			case "$releaseSuite" in
-				# see https://bugs.debian.org/src:usrmerge for why merged-usr should not be in stable yet (mostly "dpkg" related bugs)
-				*oldstable|stable)
-					initArgs+=( --no-merged-usr )
-					;;
-			esac
+			# disable merged-usr (for now?) due to the following compelling arguments:
+			#  - https://bugs.debian.org/src:usrmerge ("dpkg-query" breaks, etc)
+			#  - https://bugs.debian.org/914208 ("buildd" variant disables merged-usr still)
+			#  - https://github.com/debuerreotype/docker-debian-artifacts/issues/60#issuecomment-461426406
+			initArgs+=( --no-merged-usr )
 
 			if [ -n "$qemu" ]; then
 				initArgs+=( --debootstrap="qemu-debootstrap" )