conda-forge / miktex-feedstock

A conda-smithy repository for miktex.
BSD 3-Clause "New" or "Revised" License
3 stars 11 forks source link

Change miktex install from a portable to a regular one #2

Closed jankatins closed 8 years ago

jankatins commented 8 years ago

The portable install has the problem that additional packages and things like caches are placed in the install location. Condas way of linking files into the environments (even the root env) means that information is shared between envs and installs (e.g. the latex package DB is shared, but not the packages itself; also the package DB is reset on update but the package files itself are kept).

To avoid this, the miktex install is changed from "Portable" to "Regular" and the paths are manually set so that the "common" data/config paths still point to the miktex install in the conda env, but user installed/changed data now ends up in the user profile path:

λ initexmf --report
MiKTeX: 2.9
Invokers: ConEmu/ConEmuC64/cmd
SystemAdmin: no
PowerUser: no
OS: Windows 7 Professional, 64-bit, Service Pack 1, build 7601
Root 0: C:\Users\jschulz\AppData\Roaming\MiKTeX\2.9
Root 1: C:\Users\jschulz\AppData\Local\MiKTeX\2.9
Root 2: C:\portabel\miniconda\Library\miktex
UserInstall: C:\Users\jschulz\AppData\Roaming\MiKTeX\2.9
UserData: C:\Users\jschulz\AppData\Local\MiKTeX\2.9
UserConfig: C:\Users\jschulz\AppData\Roaming\MiKTeX\2.9
CommonInstall: C:\portabel\miniconda\Library\miktex
CommonData: C:\portabel\miniconda\Library\miktex
CommonConfig: C:\portabel\miniconda\Library\miktex

No packages are added to the default install as that would also add cache files and so on which include hardcoded paths. Until that is understood, lets just let the user download all the packages in the post-link.bat...

Closes: https://github.com/conda-forge/miktex-feedstock/issues/1

conda-forge-linter commented 8 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

jankatins commented 8 years ago

This is tested locally with a new install (removed all miktex packages, cleaned out my miktex paths in %USERPROFILE%, build and installed this one). And it worked with a nbconvert: took a bit longer the first time, but no package install questions were asked and I got a PDF on all attempts.

So, I would really like to have this included ASAP, so that the problem fixed here isn't affecting any users...

Any reviewers? @ocefpaf @ivoflipse @Korijn ?

-> IMO merge if any of you are satisfied...

Korijn commented 8 years ago

LGTM!

jankatins commented 8 years ago

Merged, thanks for the review!