From 01c2355808b53bd02e68ed3a62ba43b5633b73d7 Mon Sep 17 00:00:00 2001 From: geisserml Date: Fri, 10 Nov 2023 01:48:31 +0100 Subject: [PATCH] sourcebuild: try to fix version... --- setupsrc/pypdfium2_setup/build_pdfium.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setupsrc/pypdfium2_setup/build_pdfium.py b/setupsrc/pypdfium2_setup/build_pdfium.py index 41341caf8..0637d633d 100755 --- a/setupsrc/pypdfium2_setup/build_pdfium.py +++ b/setupsrc/pypdfium2_setup/build_pdfium.py @@ -103,11 +103,8 @@ def dl_pdfium(GClient, do_update, revision): if is_sync: # TODO consider passing -D ? - run_cmd([GClient, "sync", "--revision", f"origin/{revision}", "--no-history", "--shallow"], cwd=SBDir) - # quick & dirty fix to make a version annotated commit available - pdfium gets versioned very frequently, so this should be more than enough - # TODO tighten to check out only up to the latest tag - # FIXME the repository is still left in a very confusing state - maybe we should just drop --no-history --shallow for simplicity? - run_cmd(["git", "fetch", "--depth=100"], cwd=PDFiumDir) + # FIXME Have to use --with-branch-heads, and unable to use --shallow --no-history because of versioning. This probably makes checkout *much* slower, but not sure how to properly get the version heads afterwards. If we just fetch a fixed number of commits, the versions do appear in git log but land in the remotes refspace, which confuses git describe. + run_cmd([GClient, "sync", "--revision", f"origin/{revision}", "--with_branch_heads"], cwd=SBDir) return is_sync