Bug 246936 - doc.docbook.mk: Fix LATESTREVISION determination, causes build failure on non-English locales
Summary: doc.docbook.mk: Fix LATESTREVISION determination, causes build failure on non...
Status: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-doc (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-06-02 13:10 UTC by Olivier Certner
Modified: 2020-06-02 21:40 UTC (History)
0 users

See Also:


Attachments
Patch fixing LATESTREVISION determination (1.57 KB, patch)
2020-06-02 13:10 UTC, Olivier Certner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Certner 2020-06-02 13:10:03 UTC
Created attachment 215164 [details]
Patch fixing LATESTREVISION determination

Hi,

Please find attach a patch that fixes LATESTREVISION determination, which actually fixes "manual" articles/books build (i.e., typing `make` in the right directory).

The current code has two problems:
1. Git or SVN information retrieval depends on the current locale, and doesn't work with non-English ones.
2. Fallback for LATESTREVISION most of the time (sometimes works, probable race) itself fails because PWD is set to document's directory + '/obj', but sources are in the document's directory.

Point 2 is the most annoying because documentation builds simply fails (`xsltproc` becomes unable to resolve 'latestrevision.*' variables in, e.g., articles). But point 2's failure appears only because of point 1's failure, which doesn't happen on a machine with English or C locale.

Thanks.