clipos / bugs

CLIP OS issue tracker
https://clip-os.org
28 stars 1 forks source link

[toolkit/source_me.sh] tarfile.ReadError: not a gzip file #3

Closed theLOICofFRANCE closed 6 years ago

theLOICofFRANCE commented 6 years ago

Good morning, everyone.

First of all, thank you for your work and the release of sources. I currently have a compilation problem (clean installation of GNU/Linux).

Expected Behavior

source toolkit/source_me.sh
 [*] Setting up a "toolkit" virtualenv...
     Please be patient as this may take some time on the first run.
 [!] Virtualenv setup has failed.
     Please read the log in "run/virtualenv_setup.log" at repo root level.

Actual Behavior

cat run/virtualenv_setup.log
Looking in indexes: 
Looking in links: file:///home/loic/clipos/assets/toolkit
Collecting alabaster==0.7.11 (from -r /home/loic/clipos/toolkit/requirements.txt (line 9))
  Url 'alabaster/' is ignored. It is either a non-existing path or lacks a specific scheme.
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.7/tarfile.py", line 1643, in gzopen
    t = cls.taropen(name, mode, fileobj, **kwargs)
  File "/usr/lib/python3.7/tarfile.py", line 1619, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/usr/lib/python3.7/tarfile.py", line 1482, in __init__
    self.firstmember = self.next()
  File "/usr/lib/python3.7/tarfile.py", line 2287, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/usr/lib/python3.7/tarfile.py", line 1092, in fromtarfile
    buf = tarfile.fileobj.read(BLOCKSIZE)
  File "/usr/lib/python3.7/gzip.py", line 276, in read
    return self._buffer.read(size)
  File "/usr/lib/python3.7/_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "/usr/lib/python3.7/gzip.py", line 463, in read
    if not self._read_gzip_header():
  File "/usr/lib/python3.7/gzip.py", line 411, in _read_gzip_header
    raise OSError('Not a gzipped file (%r)' % magic)
OSError: Not a gzipped file (b've')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 291, in run
    resolver.resolve(requirement_set)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/resolve.py", line 103, in resolve
    self._resolve_one(requirement_set, req)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/resolve.py", line 257, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/resolve.py", line 210, in _get_abstract_dist_for
    self.require_hashes
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 310, in prepare_linked_requirement
    progress_bar=self.progress_bar
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/download.py", line 824, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/download.py", line 729, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 581, in unpack_file
    untar_file(filename, location)
  File "/home/loic/clipos/run/toolkit/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 514, in untar_file
    tar = tarfile.open(filename, mode)
  File "/usr/lib/python3.7/tarfile.py", line 1589, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/usr/lib/python3.7/tarfile.py", line 1647, in gzopen
    raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file

Steps to Reproduce the Problem

  1. Fresh install of Manjaro Linux x86_64
  2. Installation of the recommendations and nothing else.

Specifications

ngodinho-anssi commented 6 years ago

Hello @HacKurx,

Thanks for reporting this issue. This looks like a bad initialization of the Git LFS extension on your system. After having installed the git-lfs package from your distro, did you run git-lfs install[1] before synchronizing the source tree?

If this was not the case, I invite you to run that git-lfs install command and then the following command from within the CLIP OS source tree:

$ repo forall -c 'git lfs pull'

This will finish to download the files stored through Git LFS (and which contents are not stored in Git for performance reasons) for all the Git LFS-backed repositories and avoid you to resynchronize the whole source tree[2] from scratch.


[1]. You can verify the good functioning of the git-lfs install command by checking the file .gitconfig in your home directory. After the operation, this file should contain a section [filter "lfs"] that will "enhance" your Git commands with Git LFS features. For more information about how Git LFS works, please consult https://git-lfs.github.com.

[2]. Side note: doing a simple repo sync at this point won't trigger the download of the Git LFS files, hence the git lfs pull command described above.

theLOICofFRANCE commented 6 years ago

Hello @ngodinho-anssi

Thank you for your help and the quality of your answer.

Side note: doing a simple repo sync at this point won't trigger the download of the Git LFS files, hence the git lfs pull command described above.

Interesting detail that I think it would be interesting to add to your documentation.

The compilation is in progress. Thank you again for your help and work at all.

Off topic, If you are interested: https://github.com/HacKurx/src_external_linux/tree/feature/TPE_LSM-4.17 https://github.com/HacKurx/src_external_linux/tree/feature/sara-4.17