python shebang rewriting can fail in presence of a stage-package
Bug #1766662 reported by
Jonathan Cave
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Kyle Fazzari |
Bug Description
Attempt to snap the following yaml:
---
name: python-
version: 0
summary: test the python plugin
description: |
This is a snap with two python parts and stage-packages
confinement: strict
grade: devel
parts:
part1:
source: .
plugin: python
stage-packages:
- python3-yaml
part2:
source: .
plugin: python
python-
- bitstring
after: [part1]
---
Note that after the build step of `part1` some files will have a shebang line (on xenial here):
#! /usr/bin/python3.5
This will prevent staging of `part2` whose shebang lines appear to modified to the desired:
#!/usr/bin/env python3.5
Changed in snapcraft: | |
milestone: | none → 2.43 |
importance: | Undecided → High |
assignee: | nobody → Kyle Fazzari (kyrofa) |
status: | New → Triaged |
Changed in snapcraft: | |
status: | In Progress → Fix Committed |
Changed in snapcraft: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I propose fixing all python shebangs in stage-packages rather than just the bin directories. This proposal is available in code form here: https:/ /github. com/snapcore/ snapcraft/ pull/2112