From 04cbaf92da972378d6562631a9fe435b9df084b2 Mon Sep 17 00:00:00 2001 From: Oliver Hofmann Date: Sat, 6 Jun 2026 16:50:31 +0200 Subject: [PATCH] fix: tighten PPD validation to only catch structural errors --- installer/build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/installer/build.sh b/installer/build.sh index acd4eab..9652471 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -15,12 +15,16 @@ cp filter/kyofilter \ installer/root/usr/libexec/cups/filter/ chmod 755 installer/root/usr/libexec/cups/filter/kyofilter -# Validate PPD (fail if it cannot be parsed at all) +# Validate PPD — fail only on structural errors, not on known pre-existing issues echo "Validating PPD..." -cupstestppd installer/root/Library/Printers/PPDs/Contents/Resources/TA3505ci_AS.ppd 2>&1 \ - | grep -v "WARN\|8-Bit\|Übersetzung\|sollte\|Präfix\|übliches\|Seite\|Abschnitt" \ - | grep -v "FeedingEdgeConstraint\|kyofilter" \ - | grep "FEHLER" && { echo "ERROR: PPD has unexpected errors" >&2; exit 1; } || true +UNEXPECTED=$(cupstestppd installer/root/Library/Printers/PPDs/Contents/Resources/TA3505ci_AS.ppd 2>&1 \ + | grep "\*\*FAIL\*\*" \ + | grep -v "FeedingEdgeConstraint\|kyofilter\|Übersetzungsstring\|Übersetzung") +if [ -n "$UNEXPECTED" ]; then + echo "ERROR: PPD has unexpected structural errors:" >&2 + echo "$UNEXPECTED" >&2 + exit 1 +fi echo "PPD OK" # Build (unsigned if SIGN_IDENTITY not set)