From 131003e8bb8c79d22d068db41daa3e0e6288f723 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 18 Jan 2024 03:50:41 +0100 Subject: [PATCH] debian: Make get_vendor honor DEB_VENDOR environment variable This matches the behavior from the dpkg-vendor command. --- debian/dpkg.postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst index 7ba5961a0..113c8d53a 100644 --- a/debian/dpkg.postinst +++ b/debian/dpkg.postinst @@ -14,7 +14,9 @@ get_vendor() local origin="$DPKG_ROOT/etc/dpkg/origins/default" local vendor - if [ -e "$origin" ]; then + if [ -n "$DEB_VENDOR" ]; then + vendor="$DEB_VENDOR" + elif [ -e "$origin" ]; then vendor=$(sed -ne 's/^Vendor: *\([^ ]\+\) */\1/p' "$origin" | tr A-Z a-z) fi -- 2.11.4.GIT