fix: tighten PPD validation to only catch structural errors

This commit is contained in:
Oliver Hofmann 2026-06-06 16:50:31 +02:00
parent 4f9daa2d75
commit 04cbaf92da

View File

@ -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)