sources: use arfile to extract debs
Metadata
Current evaluation
Merged as commit ff83bf338: _deb.py now uses debian.arfile.ArFile to extract data.tar* from .deb sources instead of DebFile, fixing LP: #1731478 where apt_inst import broke non-Debian hosts.
Resolution: closed resolved
Reason: PR #1729 was merged by maintainer sergiusens as commit ff83bf338 ("sources: use arfile to extract debs (#1729)"), replacing DebFile/deb.data.tgz() with ArFile plus manual extraction of the data.tar* member. The author reported successful testing on Solus and Fedora via the stable/pr-1727 channel, resolving LP bug #1731478.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Using DebFile imports apt_inst which when run from a snap isn't properly
setup on the hosts which are not debian based.
LP: #1731478
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit ff83bf338: _deb.py now uses debian.arfile.ArFile to extract data.tar* from .deb sources instead of DebFile, fixing LP: #1731478 where apt_inst import broke non-Debian hosts. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1729 (commit ff83bf338) replaced DebFile with debian.arfile.ArFile in snapcraft/internal/sources/_deb.py, fixing LP: #1731478 where importing DebFile pulled in apt_inst and broke Snapcraft as a snap on non-Debian hosts. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1729 as ff83bf338, replacing DebFile with ArFile for .deb extraction so Snapcraft avoids the apt_inst import failure on non-Debian hosts. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix replacing DebFile with ArFile to extract .deb packages, resolving apt_inst import failures on non-Debian hosts. Approved and merged after passing CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Replaced DebFile with arfile to extract Debian packages, resolving apt_inst import failures in snaps on non-Debian hosts. Tested on Solus and Fedora. The change transparently replaces the previous method without extracting control information. |
Update history
No update history recorded yet.
Related work
-
Caused By:
snapcraft (launchpad)#1497453
(confidence 25%)
LP #1497453 is a different python-apt/host-ABI related bug, not the LP #1731478 issue fixed here; only loosely related.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1878 repo: use debian.arfile instead of dpkg-deb | snapcraft | merged | Merged as commit fa287bec3: snapcraft/internal/sources/_deb.py stopped shelling out to dpkg-deb and used debian.arfile to extract debs, avoiding tar/sshfs utime failures. Later reverted by #2111 (c008b93be). |