sources can't extract tar.xz archive

Bug #1573753 reported by Olivier - interfaSys
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

That's the trace from Snapcraft 2.8.4

```
"GET /files/transmission-2.92.tar.xz HTTP/1.1" 200 3378116
Traceback (most recent call last):
  File "/usr/bin/snapcraft", line 31, in <module>
    snapcraft.main.main()
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 146, in main
    return run(args, project_options)
  File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 193, in run
    lifecycle.snap(project_options, args['<directory>'], args['--output'])
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 240, in snap
    snap = execute('strip', project_options)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 82, in execute
    _Executor(config, project_options).run(step, part_names)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 111, in run
    self._run_step(step, part, part_names, dirty, recursed)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 149, in _run_step
    getattr(part, step)()
  File "/usr/lib/python3/dist-packages/snapcraft/internal/pluginhandler.py", line 259, in pull
    self.code.pull()
  File "/usr/lib/python3/dist-packages/snapcraft/_baseplugin.py", line 120, in pull
    sources.get(self.sourcedir, self.build_basedir, self.options)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/sources.py", line 280, in get
    handler.pull()
  File "/usr/lib/python3/dist-packages/snapcraft/internal/sources.py", line 188, in pull
    self.provision(self.source_dir)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/sources.py", line 212, in provision
    self._extract(tarball, dst)
  File "/usr/lib/python3/dist-packages/snapcraft/internal/sources.py", line 247, in _extract
    tar.extractall(members=filter_members(tar), path=dst)
  File "/usr/lib/python3.5/tarfile.py", line 1995, in extractall
    numeric_owner=numeric_owner)
  File "/usr/lib/python3.5/tarfile.py", line 2037, in extract
    numeric_owner=numeric_owner)
  File "/usr/lib/python3.5/tarfile.py", line 2115, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/usr/lib/python3.5/tarfile.py", line 2202, in makelink
    self._extract_member(self._find_link_target(tarinfo),
  File "/usr/lib/python3.5/tarfile.py", line 2369, in _find_link_target
    raise KeyError("linkname %r not found" % linkname)
KeyError: "linkname 'transmission-2.92/qt/icons/Faenza/actions/scalable/small/list-remove.svg' not found"
```

But I can extract the archive just fine from the command line using the xf flags

The snapcraft config

```
  transmission:
    plugin: autotools
    source: https://download.transmissionbt.com/files/transmission-2.92.tar.xz
    source-type: tar

```

Tags: stacktrace
summary: - autotools can't extract tar.xz source
+ "sources" plugin can't extract tar.xz source
summary: - "sources" plugin can't extract tar.xz source
+ "sources" plugin can't extract tar.xz archive
Revision history for this message
Olivier - interfaSys (olivier-interfasys) wrote : Re: "sources" plugin can't extract tar.xz archive
Kyle Fazzari (kyrofa)
summary: - "sources" plugin can't extract tar.xz archive
+ sources can't extract tar.xz archive
Cris Dywan (kalikiana)
tags: added: stacktrace
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.