← Back to issue list

python package not updating during snap creation

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1815358
Type
issue
State
open
Author
~falko-o
Labels
—
Created
Updated
Closed
—

Current evaluation

Python parts can produce snaps with stale package versions; the report needs maintainer triage into expected git-source behavior, lifecycle invalidation, or a historical plugin bug.

Suggested action: needs triage

Reason: The second run explicitly reports "Skipping build term-cheat (already ran)" and "The requested action has already been taken," indicating lifecycle reuse rather than proving a persistent package cache. Triage should determine whether uncommitted setup.py changes under source-type git, failed clean invalidation, or the historical Python plugin caused the stale result; Snapcraft and dependency versions are missing.

Evaluated by: mr-cal-bot

Impact: 38 Quick Win: 15 Complexity: 35 Confidence: 82 Actionability: 62

Issue body

When I run `snapcraft` it creates a snap package. After I fixed the bug/changed the code I run the `snapcraft` command again but the python package that I build is still in the old version. First time I run ``` Collecting TermCheat Installing collected packages: TermCheat Successfully installed TermCheat-0.1.8 /root/parts/term-cheat/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized ``` After I update the version in the `setup.py` file the `snapcraft` command does not build the python package again ``` Launching a VM. Skipping pull python-wrapper (already ran) Skipping pull term-cheat (already ran) Skipping build python-wrapper (already ran) Skipping build term-cheat (already ran) Skipping stage python-wrapper (already ran) Skipping stage term-cheat (already ran) Skipping prime python-wrapper (already ran) Skipping prime term-cheat (already ran) Determining the version from the project repo (version: git). The version has been set to '0+git.4eb9359-dirty' The requested action has already been taken. Consider specifying parts, or clean the steps you want to run again. Snapping 'term-cheat' / Snapped term-cheat_0+git.4eb9359-dirty_amd64.snap ``` The I set the `source-type:` from `git` to `local` a new version builds ``` parts: term-cheat: plugin: python source-type: local ``` `snapcraft` output ``` Installing collected packages: TermCheat Successfully installed TermCheat-0.1.9 /root/parts/term-cheat/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help ``` When now change `setup.py` again and run `snapcraft` a second time I get the following error ``` Successfully built TermCheat ERROR: You must give at least one requirement to install (maybe you meant "pip install /root/parts/term-cheat/python-packages"?) Failed to run '/root/stage/usr/bin/python3 -m pip install --user --no-compile --no-index --find-links /root/parts/term-cheat/python-packages --upgrade --no-deps': Exited with code 1. Run the same command again with --debug to shell into the environment if you wish to introspect this failure. An error occurred when trying to execute 'sudo -i snapcraft snap' with 'multipass': returned exit code 2. (term-cheat) ``` Now I set the `source-type` in the `snapcraft.yaml` back to git and it builds the package again but uses an old version ``` Successfully installed TermCheat-0.1.8 /root/parts/term-cheat/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized ``` I run `snapcraft clean` it removes all installed packages in the vm and I have to reinstall it but it does not update my package. I removed the complete multipass vm and the snapcraft app, no change everything reinstalls but the cached version of the package is used. The only method I found is to switch between `git` and `local` as `source-type`, so I can build the package once. I would also love to know where the package is cached. I was digging around for a while but could not find out where the cache is so I could clean it manually.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 38
Quick Win: 15
Complexity: 35
Confidence: 82
Actionability: 62
needs triage Python parts can produce snaps with stale package versions; the report needs maintainer triage into expected git-source behavior, lifecycle invalidation, or a historical plugin bug.
stealth/space-bunny-alpha
Impact: 44
Quick Win: 10
Complexity: 58
Confidence: 73
Actionability: 52
needs triage Repeated builds reuse an old Python package after source edits. Git mode ignores uncommitted changes, while local mode rebuilds but hits an empty pip requirements error; the report remains untriaged.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 7
Complexity: 55
Confidence: 74
Actionability: 45
needs triage Python packages stay stale because repeated snapcraft runs skip completed lifecycle steps; switching source-type and an unexplained empty local wheel error work around the legacy multipass behavior.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 18
Staleness: 95
Complexity: 40
Confidence: 60
Support Request: 40
close stale Snapcraft python plugin fails to rebuild a changed Python package on re-run, keeping the old version; user must flip source-type git/local to force a build. Legacy multipass-VM flow, no maintainer activity in ~7.5 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 90
Support Request: 60
close stale Snapcraft fails to rebuild Python packages after code changes, persisting old versions despite clean commands. User seeks cache location and workaround.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 90
close not a bug User reports Snapcraft failing to rebuild a Python package after code changes, suspecting a stale cache. Describes workarounds involving source-type changes and cleaning. No maintainer response in over 7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 90
Support Request: 65
close stale User reports snapcraft fails to rebuild Python packages after version changes, suspecting a cache issue. Issue is inactive for over 7 years and likely irrelevant to current snapcraft versions.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.