← Back to issue list

Use a user directory for temporary files

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1594374
Type
issue
State
open
Author
~croepha
Labels
—
Created
Updated
Closed
—

Current evaluation

Triaged 2016 feature request to make the parts, stage, and prime work directories configurable and move them out of the source tree; unmanaged builds still use the current directory.

Suggested action: keep open

Reason: ~sabdfl marked the report triaged, called the option useful, and invited a patch, while ~kalikiana suggested cleanbuild as a possible default. Current unmanaged lifecycle code still assigns work_dir and project_dir to Path.cwd(), and cleanbuild is no longer present after related dead-code work in #2474; per-snap cache identity, defaults, and clean or migration behavior still need design.

Evaluated by: mr-cal-bot

Impact: 42 Quick Win: 9 Complexity: 62 Confidence: 90 Actionability: 56

Issue body

So i think the parts, prime, stage directories should be placed somewhere where you can configure, and I think they should default to `~/.snapcraft/` or something like that.. I can think of multiple advantages: - You don't clutter the location of the `snapcraft.yaml` file, which can be annoying if that file is under version control - You can avoid issues where the location of the `snapcraft.yaml` is mounted using a filesystem that doesn't support all the unix capabilities that might be required during building, or avoid any security blocks that might happen because of the uid/gids of the directory - if the parts are being pulled via git/bzr, you can keep them in the same place, so that later pulls can be incremental...

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 42
Quick Win: 9
Complexity: 62
Confidence: 90
Actionability: 56
keep open Triaged 2016 feature request to make the parts, stage, and prime work directories configurable and move them out of the source tree; unmanaged builds still use the current directory.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 8
Complexity: 74
Confidence: 84
Actionability: 62
keep open Request to move configurable parts, prime, and stage directories out of the snapcraft.yaml directory; acknowledged as useful in 2016, with no evidence that configurable locations were implemented.
qwen/qwen3.6-35b-a3b
Impact: 35
Quick Win: 9
Complexity: 55
Confidence: 70
Actionability: 60
needs triage Feature request to make parts/prime/stage directories configurable, defaulting to ~/.snapcraft/ to avoid cluttering the project directory and filesystem compatibility issues.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 12
Staleness: 92
Complexity: 70
Confidence: 65
Support Request: 25
close stale Feature request from 2016 to make snapcraft build directories (parts, stage, prime) configurable with a default of ~/.snapcraft/. Zero comments, no labels, 10+ years inactive. Configurability has since been partially addressed via CRAFT_PARTS_DIR env var, but default location remains project directory.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 70
Confidence: 90
Support Request: 0
close stale Suggests moving Snapcraft build directories (parts, prime, stage) to a configurable user directory like ~/.snapcraft/ to avoid VCS clutter, filesystem permission issues, and enable incremental pulls. Unaddressed for over 10 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Suggests configuring Snapcraft to store temporary build directories in a user directory like ~/.snapcraft/ to avoid project clutter and filesystem permission issues. No activity or maintainer response in over a decade.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 90
Support Request: 10
close stale Feature request to change Snapcraft's default build directory to a configurable user path like ~/.snapcraft/ to avoid VCS clutter and permission issues. No maintainer response in over 9 years.

Update history

Date Change
created

Related work

  • Related To: snapcraft#2474 (confidence 85%)

    The cleanbuild workaround discussed in the issue was later removed with build-provider dead code, but this did not implement configurable work directories.

Related issues

No related issues found above the similarity threshold.