← Back to issue list

Runnig snapcraft with sources on parent folders (over one level) causes infinite loops

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1644350
Type
issue
State
closed
Author
~3v1n0
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged snapcore/snapcraft PR #926: local source traversal now excludes generated Snapcraft directories, preventing recursive copies when building from project subdirectories.

Resolution: closed resolved

Reason: The corrected fix proposal was snapcore/snapcraft#926. Its change to local-source copying prevented the generated parts directory from being traversed recursively.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Here's a test case: - https://git.launchpad.net/~3v1n0/+git/lets-dump-broken?h=master run snapcraft from toplevel: WORKS! run snapcraft from ./packaging: WORKS! run snapcraft from ./packaging/snap-package: FAILS! And starts looping and trying to copy over and over the parts.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged snapcore/snapcraft PR #926: local source traversal now excludes generated Snapcraft directories, preventing recursive copies when building from project subdirectories.
stealth/space-bunny-alpha — closed resolved Fixed by snapcore/snapcraft#926 (commit 0061361e8), preventing infinite recursive copying when part sources include parent folders.
stealth/space-bunny-alpha — closed resolved Fixed infinite parent-source traversal by ignoring the current directory; canonical/snapcraft#926 merged as commit 0061361e8.
stealth/space-bunny-alpha — closed stale Closed with no documented resolution, comments, or linked pull requests; no resolving commit or release was identified.
qwen/qwen3.6-35b-a3b — — Snapcraft entered an infinite loop when sources were placed in parent folders more than one level deep. The report was closed without resolution or a fix, with no comments or associated pull requests.
qwen/qwen3.6-35b-a3b — — Abandoned. The infinite loop bug triggered by snapcraft processing sources in parent directories more than one level deep was closed without a fix.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Snapcraft entered an infinite loop when packaging sources from parent directories beyond one level. No comments or patches were submitted, and the report was abandoned.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The report details an infinite loop in snapcraft when sourcing files from parent directories more than one level deep. With zero comments, the issue was abandoned.

Update history

Date Change
created

Related work

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

    The author explicitly linked this corrected PR as the fix proposal for the infinite-copy loop.

Related issues

Issue Project State Summary Similarity
#1600428 Setting source: .. causes pull to fail snapcraft (launchpad) closed Fixed by snapcore/snapcraft#725, adding support for snapcraft.yaml in a subdirectory and preventing recursive source copying.
76%
#2256 local source: don't include .snapcraft directory snapcraft merged Merged #2256 (commit abbc92427), fixing LP #1791773 by excluding .snapcraft from local-source copies and stale-part checks.
74%
#645 If "source: .." do not copy the current directory into itself. snapcraft closed Superseded by canonical/snapcraft#725, merged as a3d662744; it fixed LP #1600428 by excluding the snapcraft.yaml directory from parent-source traversal.
73%
#1590108 Go plugin breaks with snapcraft.yaml in tree snapcraft (launchpad) closed Fixed by hard-linking local sources instead of symlinking them, preventing recursive GOPATH traversal; merged in snapcore/snapcraft#622 (commit a07fa0faa).
72%
#1827216 local source must not specify parent directories snapcraft (launchpad) open Reported local-source confinement is obsolete: current craft-parts accepts relative parent paths, and Snapcraft spread tests cover sources ../.. and ../../..
70%
#725 Support having the snapcraft.yaml in a subdir. snapcraft merged Merged PR #725 (commit a3d662744) by kyrofa fixed infinite recursion when snapcraft.yaml lives in a project subdirectory, by skipping the config directory when listing sources. Resolves LP bug #1600428.
70%