Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database: ingest deprecated ESRI names to be able to better import old WKT ESRI #4282

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Oct 18, 2024

Fixes #4281
On top of PR #4280

Current proj.db build time is typically 50 to 60 seconds (and up to 7.5
hours on arm64 cross-compilation with full emulation!). Most of it is
due to running consistency checks. Those checks actually only need to run
once each time when we update the content of the database. When skipping
them, the build time is cut to 3 seconds or so.
So in data/CMakeLists.txt, let keep track of an expected md5sum
resulting from the concatenation of the data/sql/*.sql files. When
building proj.db, we check if the got and expected md5sum match. If they
do build proj.db by inserting the consistency check triggers after
having inserted data record. If there's a mismatch, do a one time build
with the triggers inserted before the data records, check that proj.db
builds fine with that, and if so, emit a CMake error message indicating
to the user that they must update the PROJ_DB_SQL_EXPECTED_MD5 variable
in data/CMakeLists.txt with the provided value. Next runs will go
through the fast build path, until content is updated again.
@rouault rouault added this to the 9.6.0 milestone Oct 18, 2024
@rouault rouault added the backport 9.5 Backport to 9.5 branch label Oct 22, 2024
@rouault rouault merged commit 13c065a into OSGeo:master Oct 22, 2024
23 checks passed
@rouault
Copy link
Member Author

rouault commented Oct 22, 2024

The backport to 9.5 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply a6f5fa77... Database: ingest deprecated ESRI names to be able to better import old WKT ESRI
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging data/CMakeLists.txt
CONFLICT (content): Merge conflict in data/CMakeLists.txt

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.5 9.5
# Navigate to the new working tree
cd .worktrees/backport-9.5
# Create a new branch
git switch --create backport-4282-to-9.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 842240d67baaee616c6ef1d415635ae923e0dac3,a6f5fa77036a578ece69117bcb7a6aa8341de1d7
# Push it to GitHub
git push --set-upstream origin backport-4282-to-9.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.5

Then, create a pull request where the base branch is 9.5 and the compare/head branch is backport-4282-to-9.5.

@rouault
Copy link
Member Author

rouault commented Oct 22, 2024

9.5 backport in #4286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 9.5 Backport to 9.5 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants