2

I am developing a songbook compilation software, that is being automatically tested on AppVeyor (windows environment).

Before testing my software, AppVeyor needs to install MikTex and some packages: I accomplish this via the mpm program. The MikTex installation runs fine.

My problem is that the package installation sometimes succeeds (the failure later is due to my software) and sometimes fails.

I don't see any difference in the logs (reported below) that could explain such behavior (except maybe the download time?). Is there any other way to debug this command? (I already use --verbose)


Online diff (success on the right)

List of packages being installed

Success

> wget https://raw.githubusercontent.com/patacrep/patacrep/master/texlive_packages.txt -OutFile ./texlive_packages.txt
> mpm.exe --install-some texlive_packages.txt --verbose
starting package maintenance...
installation directory: C:\projects\patadata-pdf\miktex
package repository: http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/
lightweight database digest: f607defbb276c3ae395deb5e62cd67b4
going to download 33499406 bytes
going to install 996 file(s) (20 package(s))
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-esperanto.tar.lzma...
135549 bytes, 214.89 KB/Sec
extracting files from babel-esperanto.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-italian.tar.lzma...
402582 bytes, 158.46 KB/Sec
extracting files from babel-italian.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-latin.tar.lzma...
172531 bytes, 1178.23 KB/Sec
extracting files from babel-latin.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-portuges.tar.lzma...
156215 bytes, 72.68 KB/Sec
extracting files from babel-portuges.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/ctablestack.tar.lzma...
155555 bytes, 449.44 KB/Sec
extracting files from ctablestack.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/etoolbox.tar.lzma...
239683 bytes, 1000.28 KB/Sec
extracting files from etoolbox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/fancybox.tar.lzma...
285651 bytes, 118.05 KB/Sec
extracting files from fancybox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/framed.tar.lzma...
248224 bytes, 1132.74 KB/Sec
extracting files from framed.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/import.tar.lzma...
247964 bytes, 74.67 KB/Sec
extracting files from import.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3kernel.tar.lzma...
6909660 bytes, 643.25 KB/Sec
visiting repository http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/...
repository type: remote package repository
loading lightweight database...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
161005 bytes, 831.91 KB/Sec
lightweight database digest: 3ffca9751ff8045ec1ad3838d8c2c4bf
extracting files from l3kernel.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3packages.tar.lzma...
1572595 bytes, 265.74 KB/Sec
extracting files from l3packages.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/mptopdf.tar.lzma...
37051 bytes, 229.00 KB/Sec
extracting files from mptopdf.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/ms.tar.lzma...
2102632 bytes, 321.54 KB/Sec
extracting files from ms.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/newunicodechar.tar.lzma...
398760 bytes, 591.81 KB/Sec
extracting files from newunicodechar.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/pgf.tar.lzma...
10594095 bytes, 521.78 KB/Sec
extracting files from pgf.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/tipa.tar.lzma...
8096508 bytes, 1053.39 KB/Sec
extracting files from tipa.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/unicode-data.tar.lzma...
215890 bytes, 276.32 KB/Sec
extracting files from unicode-data.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/url.tar.lzma...
273472 bytes, 1019.32 KB/Sec
extracting files from url.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/xcolor.tar.bz2...
753530 bytes, 150.36 KB/Sec
extracting files from xcolor.tar.bz2...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/xstring.tar.lzma...
493014 bytes, 172.32 KB/Sec
extracting files from xstring.tar.lzma...
20 packages have been successfully installed.
wget https://github.com/patacrep/patadata/archive/yaml.zip -OutFile ./patadata.zip
7z x patadata.zip * -aot -opatadata > nul
songbook patadata\patadata-yaml\books\songbook -v
ERROR:root:No such file or directory: 'patadata\\patadata-yaml\\books\\songbook'
Command exited with code 1

Failure

> wget https://raw.githubusercontent.com/patacrep/patacrep/master/texlive_packages.txt -OutFile ./texlive_packages.txt
> mpm.exe --install-some texlive_packages.txt --verbose
starting package maintenance...
installation directory: C:\projects\patadata-pdf\miktex
package repository: http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/
lightweight database digest: f607defbb276c3ae395deb5e62cd67b4
going to download 33499406 bytes
going to install 996 file(s) (20 package(s))
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-esperanto.tar.lzma...
135549 bytes, 183.60 KB/Sec
extracting files from babel-esperanto.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-italian.tar.lzma...
402582 bytes, 1095.12 KB/Sec
extracting files from babel-italian.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-latin.tar.lzma...
172531 bytes, 1347.90 KB/Sec
extracting files from babel-latin.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/babel-portuges.tar.lzma...
156215 bytes, 1250.44 KB/Sec
extracting files from babel-portuges.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/ctablestack.tar.lzma...
155555 bytes, 60.14 KB/Sec
extracting files from ctablestack.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/etoolbox.tar.lzma...
239683 bytes, 848.06 KB/Sec
extracting files from etoolbox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/fancybox.tar.lzma...
285651 bytes, 97.27 KB/Sec
extracting files from fancybox.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/framed.tar.lzma...
248224 bytes, 361.80 KB/Sec
extracting files from framed.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/import.tar.lzma...
247964 bytes, 1337.86 KB/Sec
extracting files from import.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3kernel.tar.lzma...
6909660 bytes, 816.82 KB/Sec
visiting repository http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/...
repository type: remote package repository
loading lightweight database...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma...
161005 bytes, 421.53 KB/Sec
lightweight database digest: 3ffca9751ff8045ec1ad3838d8c2c4bf
extracting files from l3kernel.tar.lzma...
downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3packages.tar.lzma...

Sorry, but "MiKTeX Package Manager" did not succeed.


The log file hopefully contains the information to get MiKTeX going again:



C:/projects/patadata-pdf/miktex/miktex/log/mpmcli.log


You may want to visit the MiKTeX project page, if you need help.

Command exited with code 1
  • 1
    In the case of "failure" miktex seem to have worked fine, the error is later. In the "success" case it is difficult to say something the log-file (C:/projects/patadata-pdf/miktex/miktex/log/mpmcli.log). But I do find a testing system that needs to install everytime such packages wrong. Why don't you create a texmf-tree with the needed packages? You can register it during the test with initexmf --register-root. – Ulrike Fischer Mar 2 '16 at 8:23
  • @UlrikeFischer as you noticed, I switched the failure and success logs (just edited my question to fix this). As far as I remember, the mpmcli.log does not have much more than what is printed (but I will try to get access to it). I didn't know about texmf-tree: seems like a good suggestion, I will look into it! (do you maybe have some good documentation about the creation of the tree?) – oliverpool Mar 2 '16 at 8:28
  • (And it just succeeded: ci.appveyor.com/project/oliverpool/patadata-pdf/build/1.0.37 - the failure is caused by my software) – oliverpool Mar 2 '16 at 8:30
  • Informations about local trees are in the miktex documentation docs.miktex.org/2.9/manual/localadditions.html#id553758. initexmf --register-root is simply the command line version of "add root" from miktex settings. – Ulrike Fischer Mar 2 '16 at 9:05
  • Looks like your connection is funky. – percusse Mar 2 '16 at 11:46
2

The relevant error you can see here:

downloading http://ctan.math.utah.edu/ctan/tex-archive/systems/win32/miktex/tm/packages/l3packages.tar.lzma...

Sorry, but "MiKTeX Package Manager" did not succeed.

Installing here brokes because the downloading can not be completed.

The reason is not given, but usually it happens because the server is overloaded or your internet connection is very slow or broken.

When I tell my students how to install/update MiKTeX, I always tell them that this broken installation/update can happen. Then just restart the process. The restarted process recognizes the already installed new packages and continues with not current ones. One of my students has to restart the installing process for 13 times, caused by a very low interbet connection he used ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.