fix: tighten PPD validation to only catch structural errors
This commit is contained in:
parent
4f9daa2d75
commit
04cbaf92da
@ -15,12 +15,16 @@ cp filter/kyofilter \
|
|||||||
installer/root/usr/libexec/cups/filter/
|
installer/root/usr/libexec/cups/filter/
|
||||||
chmod 755 installer/root/usr/libexec/cups/filter/kyofilter
|
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..."
|
echo "Validating PPD..."
|
||||||
cupstestppd installer/root/Library/Printers/PPDs/Contents/Resources/TA3505ci_AS.ppd 2>&1 \
|
UNEXPECTED=$(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 "\*\*FAIL\*\*" \
|
||||||
| grep -v "FeedingEdgeConstraint\|kyofilter" \
|
| grep -v "FeedingEdgeConstraint\|kyofilter\|Übersetzungsstring\|Übersetzung")
|
||||||
| grep "FEHLER" && { echo "ERROR: PPD has unexpected errors" >&2; exit 1; } || true
|
if [ -n "$UNEXPECTED" ]; then
|
||||||
|
echo "ERROR: PPD has unexpected structural errors:" >&2
|
||||||
|
echo "$UNEXPECTED" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "PPD OK"
|
echo "PPD OK"
|
||||||
|
|
||||||
# Build (unsigned if SIGN_IDENTITY not set)
|
# Build (unsigned if SIGN_IDENTITY not set)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user