datalad / datalad-installer

Installation script for Datalad and related components
MIT License
6 stars 3 forks source link

Installing git-annex via deb-url failed in an Appveyor CI run #146

Closed mslw closed 1 year ago

mslw commented 1 year ago

This happened in an Appveyor CI build on Ubuntu for https://github.com/datalad/datalad-neuroimaging/pull/118 https://ci.appveyor.com/project/mih/datalad-neuroimaging/builds/46200924

2023-02-10T17:47:30+0000 [INFO    ] datalad_installer Installing git-annex via deb-url
2023-02-10T17:47:30+0000 [INFO    ] datalad_installer URL: http://snapshot.debian.org/archive/debian/20210906T204127Z/pool/main/g/git-annex/git-annex_8.20210903-1_amd64.deb
2023-02-10T17:47:30+0000 [INFO    ] datalad_installer Extra args: None
2023-02-10T17:47:30+0000 [INFO    ] datalad_installer Downloading http://snapshot.debian.org/archive/debian/20210906T204127Z/pool/main/g/git-annex/git-annex_8.20210903-1_amd64.deb
2023-02-10T17:53:49+0000 [INFO    ] datalad_installer Running: sudo dpkg -i /home/appveyor/DLTMP/tmpe6i2ld4z/git-annex.deb
Selecting previously unselected package git-annex.
(Reading database ... 300710 files and directories currently installed.)
Preparing to unpack .../tmpe6i2ld4z/git-annex.deb ...
Unpacking git-annex (8.20210903-1) ...
dpkg-deb (subprocess): cannot copy archive member from '/home/appveyor/DLTMP/tmpe6i2ld4z/git-annex.deb' to decompressor pipe: unexpected end of file or stream
dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
dpkg-deb: error: <decompress> subprocess returned error exit status 2
dpkg: error processing archive /home/appveyor/DLTMP/tmpe6i2ld4z/git-annex.deb (--install):
 cannot copy extracted data for './usr/bin/git-annex' to '/usr/bin/git-annex.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
 /home/appveyor/DLTMP/tmpe6i2ld4z/git-annex.deb
Traceback (most recent call last):
  File "/home/appveyor/dlvenv/bin/datalad-installer", line 8, in <module>
    sys.exit(main())
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 2767, in main
    return manager.main(argv)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 763, in main
    self.addcomponent(name=cr.name, **cr.kwargs)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 802, in addcomponent
    component(self).provide(**kwargs)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 1260, in provide
    bins = self.get_installer(method).install(self.NAME, **kwargs)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 1388, in install
    bindir = self.install_package(package, **kwargs)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 1712, in install_package
    binpath = install_deb(
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 2654, in install_deb
    manager.sudo(*cmd)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 654, in sudo
    runcmd("sudo", *args, **kwargs)
  File "/home/appveyor/dlvenv/lib/python3.8/site-packages/datalad_installer.py", line 2616, in runcmd
    return subprocess.run(arglist, check=True, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['sudo', 'dpkg', '-i', '/home/appveyor/DLTMP/tmpe6i2ld4z/git-annex.deb']' returned non-zero exit status 1.
Command exited with code 1

Nothing changed wrt the build configuration compared to previous successful builds a few weeks earlier. For now we suspect some random corrupted download - I'll restart the build, but want to log this occurrence here. Maybe @yarikoptic can find similar events in archived logs.

mslw commented 1 year ago

Attaching full log from the failed run.

Re-running the Appveyor build helped, so the only explanation I can find is butterfly wings causing a disturbance that flipped a bit on a drive platter (https://xkcd.com/378/) - or, more seriously, randomly corrupted download?

Since the problem failed to replicate, I suppose nothing can be done other than closing this issue.