python plugin v2 doesn't quote python-packages

Bug #1884429 reported by Alberto Donato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
High
Chris Patterson

Bug Description

The v2 python pluging doesn't quote entries from python-packages when passing them to pip.

The following works when based on core18 but not with core20:

    python-packages:
      - ibm-db-sa; platform_machine == 'x86_64'
      - ibm-db-sa; platform_machine == 'ppc64le'
      - ibm-db-sa; platform_machine == 's390x'

Looking at the resulting build.sh script in the build environment, the "pip install" commands doesn't quote individual entries, so spaces cause issue.
Note that just removing spaces doesn't fix the issue, as platform_machine values need to be quoted, and quotes get lost in the script.

Manually double-quoting each entry in the script makes it work.

This is with snapcraft 4.0.5 (4892)

Revision history for this message
Alberto Donato (ack) wrote :

This is still an issue in 4.1.4

Chris Patterson (cjp256)
Changed in snapcraft:
status: New → In Progress
assignee: nobody → Chris Patterson (cjp256)
Revision history for this message
Chris Patterson (cjp256) wrote :

PR @ https://github.com/snapcore/snapcraft/pull/3246

Should be available to test in `edge/pr-3246` channel within the hour.

Changed in snapcraft:
status: In Progress → Fix Committed
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Part of 4.1.5

Changed in snapcraft:
importance: Undecided → Medium
importance: Medium → High
status: Fix Committed → Fix Released
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.