Bug 7078 - Error upon building fonts-ttf-* Packages
Summary: Error upon building fonts-ttf-* Packages
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 13:31 CEST by Shlomi Fish
Modified: 2012-08-21 22:54 CEST (History)
2 users (show)

See Also:
Source RPM: rpm-mageia-setup-build
CVE:
Status comment:


Attachments

Description Shlomi Fish 2012-08-16 13:31:24 CEST
Description of problem:

When building a fonts-ttf-* package such as fonts-ttf-dejavu using bm -l -b, I am getting this:

<<<<<<
[12] Checking tmp/DejaVuSansMono-BoldOblique.sfd.norm
[12] Checking tmp/DejaVuSerifCondensed-BoldItalic.sfd.norm
[12] Checking tmp/DejaVuSansMono.sfd.norm
+ exit 0
Processing files: fonts-ttf-dejavu-2.33-2.mga3.noarch
Finding  Provides: /usr/lib/rpm/mageia/filter.sh ' ' ' ' '/home/shlomif/Download/unpack/Mageia/fonts-ttf-dejavu/BUILDROOT/fonts-ttf-dejavu-2.33-2.mga3.x86_64' /usr/lib/rpm/mageia/find-provides
error: /usr/lib/rpm/fontconfig.prov failed
error: /usr/lib/rpm/mageia/filter.sh failed: 100
error: Failed to find Provides:
Provides: fonts-ttf-dejavu = 2.33-2.mga3
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1


RPM build errors:
    /usr/lib/rpm/mageia/filter.sh failed: 100
    Failed to find Provides:
error: failed!
shlomif[rpms]:$mageia/fonts-ttf-dejavu$ 


>>>>>>

This prevents me from upgrading fonts-ttf-libertine.
Manuel Hiebel 2012-08-19 10:49:17 CEST

CC: (none) => dmorganec, thierry.vignaud

Comment 1 Thierry Vignaud 2012-08-21 22:54:47 CEST
Unlike upstream, we check for $PIPESTATUS for fontconfig provides.

And its exit code is the one of the latest command, which in that case is the one from:
 
/usr/bin/fc-query --format '%{=pkgkit}' /foo/bar/BUILDROOT/fonts-ttf-liberation-1.07.2-1.mga3.x86_64/usr/share/fonts/TTF/liberation/;echo $?
Can't query face 0 of font file /home/tv/mga/pkgs/fonts-ttf-liberation/BUILDROOT/fonts-ttf-liberation-1.07.2-1.mga3.x86_64/usr/share/fonts/TTF/liberation/
1

Basically fc-query is run for every path matching /usr/share/fonts/, including directories, for which it'll fail.
Depending on the paths order, if the last one is a directory, fontconfig.prov will return a faillure.

We should:
- either not check for PIPESTATUS here
- or force "exit 0" in fontconfig.prov since we ignore the exit status of all other fc-query run but for the last one
- exclude directories in fontconfig.prov. but then it still fails on fonts.dir, fonts.scale ...

So I go for the 1rst solution.

Status: NEW => RESOLVED
Resolution: (none) => FIXED
Source RPM: rpm-4.10.0-10.mga3.src.rpm => rpm-mageia-setup-build


Note You need to log in before you can comment on or make changes to this bug.