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
Fix Released
Kyle Fazzari

Bug Description

Attempt to snap the following yaml:

name: python-with-two-parts-stage-packages
version: 0
summary: test the python plugin
description: |
  This is a snap with two python parts and stage-packages
confinement: strict
grade: devel

    source: .
    plugin: python
      - python3-yaml
    source: .
    plugin: 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

Revision history for this message
Jonathan Cave (jocave) wrote :
Changed in snapcraft:
milestone: none → 2.43
importance: Undecided → High
assignee: nobody → Kyle Fazzari (kyrofa)
status: New → Triaged
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

I propose fixing all python shebangs in stage-packages rather than just the bin directories. This proposal is available in code form here:

Changed in snapcraft:
status: Triaged → In Progress
Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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