From 7e0f24d348333a089bd0a852ff03017e32385a07 Mon Sep 17 00:00:00 2001 From: Matti Airas Date: Sat, 22 Nov 2025 12:02:06 +0200 Subject: [PATCH] fix(ci): use PACKAGE_NAME from workflow or debian/control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The generate-changelog.sh script had a hardcoded package name "halpi2-daemon" instead of using the PACKAGE_NAME environment variable from the workflow or reading it from debian/control. This caused the generated debian/changelog to have a different package name than debian/control, resulting in the error: dpkg-source: error: source package has two conflicting values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/scripts/generate-changelog.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/generate-changelog.sh b/.github/scripts/generate-changelog.sh index de1de2d..af1babc 100755 --- a/.github/scripts/generate-changelog.sh +++ b/.github/scripts/generate-changelog.sh @@ -31,8 +31,10 @@ if [ -z "$UPSTREAM" ] || [ -z "$REVISION" ]; then exit 1 fi -# Package name -PACKAGE_NAME="halpi2-daemon" +# Package name - use PACKAGE_NAME env var (from workflow) or read from debian/control +if [ -z "${PACKAGE_NAME:-}" ]; then + PACKAGE_NAME=$(grep "^Source:" debian/control | cut -d: -f2 | tr -d ' ') +fi # Debian version format: upstream-revision DEBIAN_VERSION="${UPSTREAM}-${REVISION}"