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

DMagick is always rebuilt even if a rebuild is not needed #24

Closed
finitemonkey opened this issue Apr 7, 2020 · 0 comments · Fixed by #25
Closed

DMagick is always rebuilt even if a rebuild is not needed #24

finitemonkey opened this issue Apr 7, 2020 · 0 comments · Fixed by #25

Comments

@finitemonkey
Copy link
Contributor

During the DMagick pre-build time, the file dmagick/c/magickVersion.d is recreated, resulting in an updated mtime for that file, which triggers a rebuild of DMagick every time regardless of whether there are any actual changes to any DMagick files.

In order to fix this, I have modified my own dmagick/build-aux/magickVersion.sh like so;

if [ ! -f "$PACKAGE_DIR/dmagick/c/magickVersion.d" ]; then
     ... sed operations ...
fi

i.e. if the file has already been created, don't create it again.

However, I suspect that the solution above won't work generally, as it will mean that if the version of MagickCore is changed on the system, it will not be picked up and trigger a rebuild of DMagick, possibly resulting in breakage? Is that the case and the reason why things are as they are?

If so, I thought that perhaps a way around that problem would be to write the version number(s) out to another file when first retreived, then read that in if it exists (on subsequent runs) and if the numbers have changed, regenerate magickVersion.d, otherwise skip any writing of files. Would that work? I would be happy to write it if so and if it would help.

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

Successfully merging a pull request may close this issue.

1 participant