# BST-TIMEOUT: 300 # measured 42s over 80 cases (2026-08-28, hz1 at load ~0, # # local-verify on the runtime the image was built from), so # # ~7x headroom. Read off the ==BST-SUITE elapsed= line, which # # is the correction BRINTOS-1449 had to ship when it guessed # # at 48x the truth. # # # # THE PROVISIONAL NOTE'S PREDICTION WAS RIGHT PER CASE AND # # WRONG IN TOTAL. Starting no probe binary (see "NO FREETYPE # # PROBE" below) does make each case cheaper -- 0.53s here # # against 0.60s for cantarell-fonts (50 cases, 30s) and 0.70s # # for liberation-fonts (33 cases, 23s), all three measured in # # this one run -- but this suite carries more than twice their # # cases, so in wall-clock it is the most expensive of the # # three, not the cheapest. # # ttf-liberation 0.2 -- the Liberation family as originally released by Red Hat # in 2007, metric-compatible substitutes for Arial, Times New Roman and Courier # New. meta-openembedded meta-oe/recipes-graphics/ttf-fonts/ttf-liberation_0.2.bb. # # ============================================================================ # THIS IMAGE ALREADY CARRIES A DIFFERENT LIBERATION PACKAGE, AND THAT IS THE # WHOLE OF WHAT MAKES THIS PORT INTERESTING. # ============================================================================ # # liberation-fonts 2.1.5 (poky, BRINTOS-1339) has been on this image since # 2026-08-23. It installs TWELVE files whose basenames are EXACTLY the twelve # this package installs -- LiberationMono/Sans/Serif-{Regular,Bold,Italic, # BoldItalic}.ttf -- into /usr/share/fonts/ttf. This package installs its twelve # into /usr/share/fonts/truetype, because ttf.inc uses the Debian layout. # # poky liberation-fonts 2.1.5 /usr/share/fonts/ttf 281,536-415,816 # THIS ttf-liberation 0.2 /usr/share/fonts/truetype 61,144-156,076 # # Same names, same three family strings, different releases, different bytes, # different directories, and NO SIZE IN ONE SET COLLIDES WITH ANY SIZE IN THE # OTHER. Every case in this suite is therefore scoped by FULL PATH; a case # scoped by basename would be satisfied by the neighbour's file and prove # nothing. distinct-from-poky in the verify awk asserts the separation directly, # because "both directories somehow hold poky's bytes" is a packaging mistake # every per-file case would otherwise pass. # # ============================================================================ # fc-match DOES NOT RESOLVE TO THIS PACKAGE, AND THAT IS CORRECT BEHAVIOUR # RATHER THAN A DEFECT IN THE PORT. # ============================================================================ # # The ticket asks that `fc-match` for each family "resolves to a file from this # package rather than falling through to another font". On an image that already # carries Liberation 2.1.5 it resolves to THAT release instead, and it does so # for a reason that is intrinsic to the fonts rather than an artefact of scan # order: fontconfig ranks candidates by language coverage, and 2.1.5's faces # cover far more of it. # # LiberationSans-Regular.ttf poky 2.1.5 175 languages # LiberationSans-Regular.ttf THIS 0.2 120 languages # # MEASURED, NOT REASONED (x86-64 fontconfig control, 2026-08-27): with both sets # visible, all three families resolve to the 2.1.5 file, and they still do when # the directory order is REVERSED -- so this is content-driven and stable, not an # ordering accident. With 2.1.5 absent, all three resolve to THIS package's # faces, so these faces are perfectly usable; they are simply outranked. In # `fc-match --sort` this package's face is rank 2, immediately behind its 2.1.5 # namesake and ahead of every non-Liberation font on the box. # # WHAT THE SUITE ASSERTS IS THEREFORE THE PROPERTY THE TICKET WAS REACHING FOR, # WHICH IS NOT THE SAME AS ITS LITERAL WORDING. The ticket's own gloss says the # fc-match case is "the assertion that proves the font is actually usable and not # merely present on disk", and the check that proves that here is that the family # resolves to a LIBERATION face of the requested family rather than falling # through to DejaVu, Vera or Source Code Pro. fc-match-file-* additionally pins # WHICH release wins, so the day this port's faces start winning -- a 2.1.5 # removal, a fontconfig ranking change, a new fragment -- it is a named red here # instead of a silent change of what the image renders. # # ============================================================================ # # NO -doc PACKAGE AND NO BARE PACKAGE. `PACKAGES` is an ASSIGNMENT naming # exactly ttf-liberation-{mono,sans,serif} -- so there is no `ttf-liberation` # package and no `ttf-liberation-doc`, and `IMAGE_INSTALL += "ttf-liberation"` # would not resolve. ttf.inc's do_install copies only *.tt[cf], so COPYING and # License.txt never leave ${S} and no package could carry them. pkg-no-bare- # package and pkg-no-doc-package assert those absences, because "the line was # forgotten" and "there is no such package by design" look identical from the # file layer alone. # # NO FREETYPE PROBE, DELIBERATELY. The four probe-driven font suites beside this # one (vera, inconsolata, gentium, droid) run data/freetype-probe because their # tickets ask for freetype's own num_faces/num_glyphs/units_per_EM. THIS ticket # asks for fc-list, fc-query and fc-match, and nothing else -- so the second, # independent parse here is fontconfig's own (fc-query, against a committed # x86-64 control) rather than FreeType's API. That is the ticket's scope, not a # gap: adding a 7.8 MB probe run per face would cost this suite ~40s to assert # something the ticket did not ask about. # # THE DIRECTORY IS NOW SHARED FIVE WAYS. /usr/share/fonts/truetype was created by # ttf-inconsolata, then joined by ttf-gentium, ttf-droid and source-code-pro- # fonts, and joined again here. All four neighbours scope their own "no-extras" # cases by basename, so NONE had to be amended for this port. What DID have to be # amended is 99-liberation-fonts and 99-cantarell-fonts -- see below. # # THREE CASES IN TWO OTHER SUITES WERE AMENDED IN THE SAME CHANGE, AND THEY ARE # THE HONEST COST OF THIS PORT: # # 99-liberation-fonts fc-family-{sans,serif,mono} counted family matches # across EVERY directory, so this port's twelve took them # from 4 to 8. Re-scoped to poky's own directory, which is # what that suite can honestly assert. # liberation-fonts- no-debian-fontpath asserted NO Liberation file lives # verify.awk under /usr/share/fonts/truetype. That guard was written # to catch POKY's payload moving there; this port puts a # different release there legitimately. Re-scoped from # "no Liberation file" to "none of poky's OWN bytes", # keyed on size, which the two sets never share. # cantarell-fonts- cotenant-truetype counts every file in the shared # verify.awk directory: 26 -> 38. That case moving is that case # WORKING, exactly as it moved 12 -> 26 for BRINTOS-1455. # # THE fontcache POSTINST IS CHECKED RATHER THAN ASSUMED, IN THE ONE FORM THAT IS # BOOT-MODE INDEPENDENT. fontcache.bbclass appends fontconfig-utils to RDEPENDS # for every FONT_PACKAGES entry -- read back off the target here, not off the # recipe -- and registers an update_font_cache intercept that runs fc-cache under # qemu-user. There is no wasm32 qemu-user, so it is deferred to run-postinsts at # first boot, which /etc/inittab does run (BRINTOS-53). Whether it HAS run # depends on the pid 1 the harness booted -- the local runner goes straight to a # shell -- so asserting the configured state would report the runner's choice as # a package red. What is asserted instead is that the scriptlet is on the image # for all three packages, it calls fc-cache, and fc-cache is present, so the # deferred run cannot fail for want of the tool. # # THIS PORT ADDS NO NEW MAXIMUM MAPPING, WHICH IS WHY THE CONSUMER BLOCK IS SAFE. # File-backed mmap on this arm is REFUSED above a threshold and the consumer # PARKS rather than falling back (linux-in-the-browser#165, bracketed on this # image between ~66 kB and 577,708 bytes). This package's largest face is 156,076 # bytes -- SMALLER than the smallest of the twelve 2.1.5 Liberation faces # (281,536) that every fc-cache on this image already walks. So it adds twelve # mappings strictly below a band the image already lives in. The consumer block # is still ordered LAST and the fc-cache call still bounded, for the reason # 99-ttf-droid gives: that ordering is what protects the evidence, not the bound. . "$BST_LIB" S=ttf-liberation # THE CANARY, which asserts nothing about ttf-liberation. # # A suite's FIRST BST result line is lost between the guest's printf and the # host's read -- per-suite, deterministic, and NOT a defect in the host tool # (BRINTOS-1149 established that and filed it as linux-in-the-browser#177). The # harness reports the deficit but computes its pass count as total-minus- # failures, so THE DROPPED LINE IS COUNTED AS A PASS. A nothing-case therefore # stands in that position and the eaten line costs nothing; every real case below # is still counted. It sits ahead of the `require` guards deliberately, because a # `require` that skips would emit its skip as the first line and be eaten too. # # Remove this case when linux-in-the-browser#177 is fixed. bst_ok $S/suite-canary D=$BST_DATA REF=$D/ttf-liberation-manifest.txt FACES=$D/ttf-liberation-fcfaces.txt TTFDIR=/usr/share/fonts/truetype COTDIR=/usr/share/fonts/ttf PI_MONO=/var/lib/dpkg/info/ttf-liberation-mono.postinst PI_SANS=/var/lib/dpkg/info/ttf-liberation-sans.postinst PI_SERIF=/var/lib/dpkg/info/ttf-liberation-serif.postinst tmp=${TMPDIR:-/tmp} W=$tmp/bst-ttf-liberation.$$ require gawk $S/gawk-present require sha256sum $S/sha256sum-present require find $S/find-present # fc-query runs in the payload block, ahead of the consumer block's own check, so # its absence is guarded here. It is NOT a `require`: fontconfig-utils is a hard # Depends of all three packages, so an absent fc-query is a defect in the port # rather than a legitimately absent tool, and a skip would report it green. if [ -x /usr/bin/fc-query ]; then bst_ok $S/fc-query-present else bst_notok $S/fc-query-present "fontconfig-utils is a Depends of ttf-liberation-sans but /usr/bin/fc-query is absent"; fi if [ ! -f "$REF" ] || [ ! -f "$FACES" ]; then bst_notok $S/ref-present "the reference data did not ship: $REF / $FACES" exit 0 fi bst_ok $S/ref-present # The twelve basenames, named once and reused. Ordered as the manifest is. FACELIST="LiberationMono-Bold.ttf LiberationMono-BoldItalic.ttf LiberationMono-Italic.ttf LiberationMono-Regular.ttf LiberationSans-Bold.ttf LiberationSans-BoldItalic.ttf LiberationSans-Italic.ttf LiberationSans-Regular.ttf LiberationSerif-Bold.ttf LiberationSerif-BoldItalic.ttf LiberationSerif-Italic.ttf LiberationSerif-Regular.ttf" # ------------------------------------------------------------- payload shape # One find over THIS package's directory and over poky's, so every count below # is a measurement from the same pass. %y catches a symlink where a regular file # is meant and %m the mode -- neither of which `test -f` can see. find "$TTFDIR" "$COTDIR" \ -maxdepth 1 -printf '%p %y %s %m %l\n' 2>/dev/null | LC_ALL=C sort > "$W.inv" # One sha256sum over the twelve payload files. Named explicitly rather than # globbed: a glob of "$TTFDIR"/Liberation* would be right today but would also # silently absorb a thirteenth Liberation file, which is precisely what # ttf-count exists to catch. _paths="" for _b in $FACELIST; do _paths="$_paths $TTFDIR/$_b"; done # shellcheck disable=SC2086 sha256sum $_paths > "$W.sums" 2>&1 # One fc-query sweep over the twelve installed faces -- the ticket's named # check. It reads the FILES, not the cache, so it is independent of the fc-cache # in the consumer block below. Field order matches the committed control. # shellcheck disable=SC2086 LC_ALL=C fc-query --format '%{file|basename}|%{family}|%{style}|%{slant}|%{weight}|%{spacing}|%{fontformat}\n' \ $_paths 2>/dev/null | LC_ALL=C sort > "$W.scan" LC_ALL=C gawk -v REF="$REF" -v SUMS="$W.sums" -v INV="$W.inv" \ -v FACES="$FACES" -v SCAN="$W.scan" \ -f "$D/ttf-liberation-verify.awk" "$REF" "$W.sums" "$W.inv" "$FACES" "$W.scan" # ---------------------------------------------------- the packaging on target # THE PACKAGE DATABASE IS THE ONLY PLACE THE THREE-WAY SPLIT IS VISIBLE ON # TARGET, and the split is the part of this port the ticket says can go wrong. # The file-* cases would look identical if do_install had written all twelve # files into one package, so they cannot say that ttf-liberation-serif is a real # package the image installs rather than an IMAGE_INSTALL line that resolved to # nothing. One sed pulls every stanza; the loop is shell builtins. The stanzas # are read from a tmpfs copy, never redirected from the rootfs (brintos/linux#73). # # THE ANCHORS ARE EXACT ON PURPOSE. `ttf-liberation` is a PREFIX of all three # real package names, so an unanchored match would report a font package's # stanza as the bare package's and make pkg-no-bare-package unfalsifiable. sed -n '/^Package: ttf-liberation$/,/^$/p; /^Package: ttf-liberation-doc$/,/^$/p; /^Package: ttf-liberation-mono$/,/^$/p; /^Package: ttf-liberation-sans$/,/^$/p; /^Package: ttf-liberation-serif$/,/^$/p' \ /var/lib/dpkg/status > "$W.st" 2>/dev/null _pkg=""; _mono=0; _sans=0; _serif=0; _bare=0; _doc=0 _amono=0; _asans=0; _aserif=0; _dmono=0; _dsans=0; _dserif=0 while IFS= read -r l; do case "$l" in "Package: ttf-liberation") _pkg=bare; _bare=1 ;; "Package: ttf-liberation-doc") _pkg=doc; _doc=1 ;; "Package: ttf-liberation-mono") _pkg=mono; _mono=1 ;; "Package: ttf-liberation-sans") _pkg=sans; _sans=1 ;; "Package: ttf-liberation-serif") _pkg=serif; _serif=1 ;; "Architecture: all") [ "$_pkg" = mono ] && _amono=1 [ "$_pkg" = sans ] && _asans=1 [ "$_pkg" = serif ] && _aserif=1 ;; "Depends: "*) case "$l" in *fontconfig-utils*) [ "$_pkg" = mono ] && _dmono=1 [ "$_pkg" = sans ] && _dsans=1 [ "$_pkg" = serif ] && _dserif=1 ;; esac ;; esac done < "$W.st" # THE THREE PACKAGES THIS IMAGE INSTALLS. Each is a third of the port: a dropped # IMAGE_INSTALL line would take that family's file-* and fcq-* cases with it, and # these cases say the cause is a missing PACKAGE rather than missing files. if [ "$_mono" -eq 1 ]; then bst_ok $S/pkg-mono-known else bst_notok $S/pkg-mono-known "dpkg does not know the package ttf-liberation-mono"; fi if [ "$_sans" -eq 1 ]; then bst_ok $S/pkg-sans-known else bst_notok $S/pkg-sans-known "dpkg does not know the package ttf-liberation-sans"; fi if [ "$_serif" -eq 1 ]; then bst_ok $S/pkg-serif-known else bst_notok $S/pkg-serif-known "dpkg does not know the package ttf-liberation-serif"; fi # THERE IS NO ttf-liberation PACKAGE, AND ITS ABSENCE IS THE RECIPE. `PACKAGES` # is an assignment that omits ${PN} entirely, so `IMAGE_INSTALL += "ttf-liberation"` # would not resolve. This case names that, because a future recipe revision # restoring the default PACKAGES would change what the image must ask for. if [ "$_bare" -eq 0 ]; then bst_ok $S/pkg-no-bare-package else bst_notok $S/pkg-no-bare-package "dpkg knows a ttf-liberation package -- PACKAGES no longer omits \${PN}"; fi if [ "$_doc" -eq 0 ]; then bst_ok $S/pkg-no-doc-package else bst_notok $S/pkg-no-doc-package "dpkg knows a ttf-liberation-doc package -- PACKAGES no longer omits \${PN}-doc"; fi # `allarch` reached the package metadata, which is what makes the byte-identity # reference in the manifest a statement about this build rather than a # coincidence. Asserted for all three: they are built by one recipe but packaged # separately, and a class that reached one need not have reached the others. if [ "$_amono" -eq 1 ]; then bst_ok $S/pkg-mono-arch-all else bst_notok $S/pkg-mono-arch-all "ttf-liberation-mono is not Architecture: all"; fi if [ "$_asans" -eq 1 ]; then bst_ok $S/pkg-sans-arch-all else bst_notok $S/pkg-sans-arch-all "ttf-liberation-sans is not Architecture: all"; fi if [ "$_aserif" -eq 1 ]; then bst_ok $S/pkg-serif-arch-all else bst_notok $S/pkg-serif-arch-all "ttf-liberation-serif is not Architecture: all"; fi # THE fontcache CLASS'S RDEPENDS, READ BACK OFF THE TARGET. The recipe declares # no runtime dependency at all and ttf.inc sets INHIBIT_DEFAULT_DEPS -- # fontcache.bbclass appends fontconfig-utils to each FONT_PACKAGES entry -- so # these are the cases that say the class did its half for all three packages and # that the dependency resolved against a package this image already carried # (fontconfig-utils has been here since BRINTOS-1032). if [ "$_dmono" -eq 1 ]; then bst_ok $S/pkg-mono-depends-fontconfig else bst_notok $S/pkg-mono-depends-fontconfig "ttf-liberation-mono does not Depend on fontconfig-utils"; fi if [ "$_dsans" -eq 1 ]; then bst_ok $S/pkg-sans-depends-fontconfig else bst_notok $S/pkg-sans-depends-fontconfig "ttf-liberation-sans does not Depend on fontconfig-utils"; fi if [ "$_dserif" -eq 1 ]; then bst_ok $S/pkg-serif-depends-fontconfig else bst_notok $S/pkg-serif-depends-fontconfig "ttf-liberation-serif does not Depend on fontconfig-utils"; fi # ------------------------------------------------- the deferred fontcache hook # ALL THREE packages are in FONT_PACKAGES, so all three get a scriptlet. if [ -f "$PI_MONO" ]; then bst_ok $S/postinst-mono-present else bst_notok $S/postinst-mono-present "$PI_MONO is absent -- the fontcache postinst did not reach the image"; fi if [ -f "$PI_SANS" ]; then bst_ok $S/postinst-sans-present else bst_notok $S/postinst-sans-present "$PI_SANS is absent -- the fontcache postinst did not reach the image"; fi if [ -f "$PI_SERIF" ]; then bst_ok $S/postinst-serif-present else bst_notok $S/postinst-serif-present "$PI_SERIF is absent -- the fontcache postinst did not reach the image"; fi # They call fc-cache on the branch run-postinsts takes ($D unset at first boot). check_out $S/postinst-mono-runs-fc-cache "fc-cache" cat "$PI_MONO" check_out $S/postinst-sans-runs-fc-cache "fc-cache" cat "$PI_SANS" check_out $S/postinst-serif-runs-fc-cache "fc-cache" cat "$PI_SERIF" # ...and the tool that branch needs is present, so the deferred run cannot fail # for want of it. This is the ticket's stated risk, and it is a shell builtin. if [ -x /usr/bin/fc-cache ]; then bst_ok $S/fc-cache-present else bst_notok $S/fc-cache-present "fontconfig-utils is a Depends of ttf-liberation-sans but /usr/bin/fc-cache is absent"; fi # --------------------------------------------------------- the consumer block # # EVERYTHING BELOW THIS LINE CAN COST THE GUEST, AND THAT IS WHY IT IS LAST. # fc-cache mmaps each face it walks, and file-backed mmap on this arm is REFUSED # above a mapping-length threshold (linux-in-the-browser#165) -- and the consumer # does not get a failed mmap and fall back, it PARKS, beyond the reach of both # SIGTERM and SIGKILL, taking the guest and every suite behind it in the same # boot. Ordering this block last is the only thing that actually protects the # evidence: every case above has already been emitted by the time the first # mapping happens. # # THIS PORT'S TWELVE FACES SIT BELOW THE IMAGE'S ENTIRE EXISTING LIBERATION # WORKING SET. #165's bracket on this image is ~66 kB to 577,708 bytes; these are # 61,144 to 156,076, and the twelve 2.1.5 faces already walked by every fc-cache # run 281,536 to 415,816 -- every one of them LARGER than anything this port # adds. So this package cannot introduce a new failure mode or a new maximum. # # BRINTOS-WORKAROUND: linux-in-the-browser#165 remove -- bound the fc-cache call # and order the consumer block last; both go when the mmap population path # tolerates a parking read. # `fc-cache`, NOT `fc-cache -f`, SINCE BRINTOS-1725. The -f rebuilt every # directory whether or not its cache was valid, which means mapping every face on # the image; a file-backed mapping above roughly 578 kB is REFUSED over the cloud # FUSE bridge and the caller PARKS, beyond SIGKILL (linux-in-the-browser#165, # bracketed by BRINTOS-1450). Before ttf-pt-sans the image's largest face was # Ubuntu-L.ttf at 415,552 bytes, under the bracket, and this call was harmless; # that port adds four faces above it, the largest 584,812. # # THIS SUITE WAS NOT ITSELF MEASURED PARKING, and that is worth stating rather # than implying. It landed on main after the base BRINTOS-1725 was built against, # so it was not on the image its census swept and became visible only at the # merge. Four of its peers WERE measured, on the ported image, each dying at the # 600 s bound in its consumer block -- 99-cantarell-fonts at 43 of 50, # 99-ttf-gentium at 47 of 55, 99-source-code-pro-fonts at 86 of 96 and # 99-liberation-fonts at 24 of 25 -- against 50/50 and 55/55 for the first two on # the same base pin without the port. This suite makes the same call over the # same font set. Without -f, fc-cache rebuilds only what is stale, and nothing # is: /var/cache/fontconfig ships populated, and `fc-cache` returns 0 in 3 s on # that image where `timeout -k 5 150 fc-cache -f` never returned. The case still # asserts what it always did. # # BRINTOS-WORKAROUND: linux-in-the-browser#165 revisit -- drop -f so only a stale # cache is rebuilt; it goes back in when the mmap population path tolerates a # parking read. # BST-TIMEOUT-OK: fc-cache walks the font dirs and exits; -k 5 90 is belt-and-braces. timeout -k 5 90 fc-cache > "$W.cache" 2>&1 _rc=$? if [ "$_rc" -eq 0 ]; then bst_ok $S/fc-cache-rc elif [ "$_rc" -eq 124 ] || [ "$_rc" -eq 137 ]; then bst_notok $S/fc-cache-rc "fc-cache did not return within 90s -- linux-in-the-browser#165 (mmap population parked)" else bst_notok $S/fc-cache-rc "fc-cache exited $_rc: $(_bst_1line "$(cat "$W.cache")")"; fi # One fc-list for the whole consumer read; the parsing below is shell builtins. fc-list : file family > "$W.list" 2>&1 # THE FACES ARE DISCOVERABLE THROUGH THE CACHE, not merely present on disk and # parseable by fc-query. A cache that serialised wrongly, or a FreeType that # refused the outlines, shows up here while every file-* and fcq-* case above # stays green -- which is the split that says where to look. Matched on the FULL # PATH, so poky's identically-named face cannot satisfy this. for _b in $FACELIST; do case "$_b" in LiberationMono-*) _wantfam="Liberation Mono" ;; LiberationSans-*) _wantfam="Liberation Sans" ;; LiberationSerif-*) _wantfam="Liberation Serif" ;; esac _seen=0; _fam="" while IFS= read -r l; do case "$l" in "$TTFDIR/$_b":*) ;; *) continue ;; esac _seen=$((_seen+1)) _fam=${l#*: } done < "$W.list" if [ "$_seen" -eq 1 ] && [ "$_fam" = "$_wantfam" ]; then bst_ok "$S/fc-list-$_b" else bst_notok "$S/fc-list-$_b" "fc-list reports $_seen entries for $TTFDIR/$_b family '$_fam', want 1 of '$_wantfam'" fi done # EACH FAMILY RESOLVES TO A LIBERATION FACE OF THAT FAMILY. This is the ticket's # "actually usable and not merely present on disk" check, in the form that is # true on THIS image -- see the header. fc-match never fails, it always returns # some face, so this is real only because 40-odd non-Liberation faces are # installed alongside: a family that did not reach the cache falls through to # one of them, which is exactly what 99-terminus-font's first on-target run # reported for its own family. for _fam in "Liberation Mono" "Liberation Sans" "Liberation Serif"; do _out=$(fc-match --format '%{family}' "$_fam" 2>&1) _id=$(printf '%s' "$_fam" | tr ' ' '-') if [ "$_out" = "$_fam" ]; then bst_ok "$S/fc-match-family-$_id" else bst_notok "$S/fc-match-family-$_id" "fc-match '$_fam' => family '$(_bst_1line "$_out")', want '$_fam' -- fell through to another font"; fi done # ...AND WHICH RELEASE WINS IS PINNED, BECAUSE IT IS THE PORT'S ONE SURPRISE. # poky's liberation-fonts 2.1.5 outranks this package on language coverage (175 # vs 120 for Sans-Regular), measured against an x86-64 control and stable under a # reversed directory order. These cases are NOT restatements of the three above: # those stay green if the winner changed release, and this is the layer where # that shows. A red here means the image now renders a DIFFERENT Liberation than # it did -- which may be intended (a 2.1.5 removal) but must never be silent. for _fam in "Liberation Mono" "Liberation Sans" "Liberation Serif"; do case "$_fam" in "Liberation Mono") _wantf=$COTDIR/LiberationMono-Regular.ttf ;; "Liberation Sans") _wantf=$COTDIR/LiberationSans-Regular.ttf ;; "Liberation Serif") _wantf=$COTDIR/LiberationSerif-Regular.ttf ;; esac _out=$(fc-match --format '%{file}' "$_fam" 2>&1) _id=$(printf '%s' "$_fam" | tr ' ' '-') if [ "$_out" = "$_wantf" ]; then bst_ok "$S/fc-match-file-$_id" else bst_notok "$S/fc-match-file-$_id" "fc-match '$_fam' => '$(_bst_1line "$_out")', want '$_wantf' (poky 2.1.5 outranks this port on lang coverage)"; fi done # A FAMILY THIS PACKAGE DOES NOT PROVIDE MUST NOT RESOLVE INTO IT. The ticket # asks for this so "a mis-scoped fontconfig entry fails rather than passing by # accident". Liberation Sans Narrow is the sharpest available probe: it is a real # Liberation family name, it is NOT in this package (it is meta-oe's separate # ttf-liberation-sans-narrow recipe, BRINTOS-1722, not on this image), and it # would be the natural casualty of a FILES glob widened to Liberation*. The # assertion is on the DIRECTORY, not on the answer: fc-match must return # something, and what it must not return is one of ours. for _fam in "Liberation Sans Narrow" "Liberation Fantasy"; do _out=$(fc-match --format '%{file}' "$_fam" 2>&1) _id=$(printf '%s' "$_fam" | tr ' ' '-') case "$_out" in "$TTFDIR"/Liberation*) bst_notok "$S/fc-match-unprovided-$_id" "fc-match '$_fam' resolved into this package: '$(_bst_1line "$_out")' -- a family this package does not provide must not match here" ;; *) bst_ok "$S/fc-match-unprovided-$_id" ;; esac done rm -f "$W.inv" "$W.sums" "$W.scan" "$W.st" "$W.cache" "$W.list" 2>/dev/null