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

fix CRAN NOTE about files in temp directory #349

Merged
merged 1 commit into from
Aug 21, 2021
Merged

Conversation

StrikerRUS
Copy link
Member

To fix the following CRAN NOTE:

* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
  ‘rgf’

#348 (comment)

@@ -50,6 +50,7 @@ Invoke-WebRequest -Uri https://sourceforge.net/projects/qpdf/files/qpdf/10.3.1/q
Copy-Item .\qpdf -Destination $env:R_LIB_PATH -Recurse

initexmf --set-config-value [MPM]AutoInstall=1
$env:MIKTEX_EXCEPTION_PATH = "$env:TEMP\miktex"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to avoid the following new CRAN NOTE on Windows:

* checking for detritus in the temp directory ... NOTE
Found the following files/directories:
  'lastMiKTeXException'

Env variable was found in sources of MikTeX:
https://github.com/MiKTeX/miktex/blob/ab8ebca7c70fe8c9a1392dfb2393a0a7683e14cc/Libraries/MiKTeX/Core/Exceptions.cpp#L155-L183
https://github.com/MiKTeX/miktex/blob/ab8ebca7c70fe8c9a1392dfb2393a0a7683e14cc/Libraries/MiKTeX/Core/include/miktex/Core/Environment.h#L37

We cannot remove MikTeX temp files during running testthat because PDF generation happens later in CRAN checks after tests have been finished.
Ideally, this path should be controlled via TempDir config value, but it doesn't.
https://mirror.truenetwork.ru/CTAN/systems/win32/miktex/doc/miktex.pdf

initexmf --set-config-value [Core]TempDir="$env:TEMP\miktex"

Copy link
Collaborator

@mlampros mlampros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@mlampros mlampros merged commit b344a64 into master Aug 21, 2021
@StrikerRUS StrikerRUS deleted the fix_cran_note branch August 21, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants