← Back to issue list

Expose parallel_build_count as a well-known variable to scriptlets

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1666271
Type
issue
State
closed
Author
~osomon
Labels
—
Created
Updated
Closed

Current evaluation

Feature request fulfilled: PR snapcore/snapcraft#1154 (commit 9da78e45a, "project: expose parallel_build_count to scriptlets") added SNAPCRAFT_PARALLEL_BUILD_COUNT to scriptlet env vars; author confirmed implementation, issue closed.

Resolution: closed resolved

Reason: Merged PR snapcore/snapcraft#1154, commit 9da78e45a, exported parallel_build_count to scriptlets as SNAPCRAFT_PARALLEL_BUILD_COUNT (still present in snapcraft/parts/lifecycle.py and documented in docs/reference/part-environment-variables.rst). The author closed the Launchpad bug noting it was implemented in that PR.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Use case: I had a custom plugin to build the 0AD snap, and I replaced it by scriptlets, which makes the packaging easier to maintain. Changes at https://bazaar.launchpad.net/~osomon/+junk/0ad-snap/revision/10. One thing I was not able to achieve is invoke `make` from a scriptlet with the -jN flag. In custom plugins there is the 'parallel_build_count' property, it would be useful to expose it as a variable to scriptlets.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Feature request fulfilled: PR snapcore/snapcraft#1154 (commit 9da78e45a, "project: expose parallel_build_count to scriptlets") added SNAPCRAFT_PARALLEL_BUILD_COUNT to scriptlet env vars; author confirmed implementation, issue closed.
stealth/space-bunny-alpha — closed resolved Feature request closed as implemented: merged PR canonical/snapcraft#1154 (commit 9da78e45a) exposes parallel_build_count to scriptlets as SNAPCRAFT_PARALLEL_BUILD_COUNT; tracked on Launchpad bug #1666271.
stealth/space-bunny-alpha — closed resolved Resolved by snapcraft PR #1154 (commit 9da78e45a), which exposes parallel_build_count to scriptlets as the SNAPCRAFT_PARALLEL_BUILD_COUNT env var, set in snapcraft/parts/lifecycle.py and documented in part-environment-variables.rst.
stealth/space-bunny-alpha — closed resolved Implemented by canonical/snapcraft#1154 (commit 9da78e45a), exposing parallel_build_count to scriptlets as SNAPCRAFT_PARALLEL_BUILD_COUNT.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The feature request to expose parallel_build_count as a scriptlet variable was abandoned, with no code changes or resolution provided.
qwen/qwen3.6-35b-a3b — — The request to expose parallel_build_count as a scriptlet variable was closed without implementation. No comments or patches were submitted, leaving the feature abandoned.
qwen/qwen3.6-35b-a3b — — The feature request to expose parallel_build_count as a scriptlet variable was closed without resolution. No implementation or merge occurred, indicating the request was abandoned.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution or comments. The request to expose parallel_build_count to scriptlets was not implemented, indicating the feature was declined or abandoned.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1154 (confidence 96%)

    PR referenced in the closing comment; commit 9da78e45a implements the change and is present in the current source tree.

Related issues

Issue Project State Summary Similarity
#1154 Expose parallel_build_count to scriptlets (LP: #1666271). snapcraft merged Merged PR #1154 in commit 9da78e45a, exposing parallel_build_count to scriptlets as SNAPCRAFT_PARALLEL_BUILD_COUNT after the requested rename.
89%
#3997 providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance snapcraft merged PR #3997 merged (commit 31a3990c8) forwarding SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT into the build provider instance, so parallel build limits are honored inside the build environment.
73%
#4041 utils: log envvar SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT when invalid snapcraft merged Merged PR #4041 (commit 1f8bef63c): snapcraft/utils.py get_parallel_build_count() now emits a debug log with the invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT value. No functional change.
71%