Pull stage of an unspecified part is unexpectedly cleaned by snapcraft

Bug #1772027 reported by 林博仁(Buo-ren Lin)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Low
Kyle Fazzari

Bug Description

snapcraft.yaml: http://paste.ubuntu.com/p/Zpg8gghHNK/

== Reproduce Instructions
1. Build once
2. Run `snapcraft clean desktop-gtk3 -s pull`

== Expected Behavior
Several priming/staging stage are cleaned but only desktop-gtk3's pull stage is cleaned

== Current Behavior
Another, `poedit` part's pull stage is also cleaned, which is unnecessary at all.

```
Requested clean of 'desktop-gtk3' which requires also cleaning the part 'poedit'
Cleaning priming area for poedit
Cleaning staging area for poedit
Cleaning build for poedit
Cleaning pulled source for poedit
Cleaning priming area for desktop-gtk3
Cleaning staging area for desktop-gtk3
Cleaning build for desktop-gtk3
Cleaning pulled source for desktop-gtk3
```

summary: - Pull stage of a unspecified part is cleaned by snapcraft
+ Pull stage of a unspecified part is unexpectedly cleaned by snapcraft
description: updated
Revision history for this message
Sergio Schvezov (sergiusens) wrote : Re: Pull stage of a unspecified part is unexpectedly cleaned by snapcraft

poedit says it needs to run `after` desktop-gtk3, which means that any changes done to desktop-gtk3 could affect the outcome of poedit (this is what `after` implies).
We will make the messaging clear on why it is being cleaned.

Changed in snapcraft:
status: New → Triaged
importance: Undecided → Low
summary: - Pull stage of a unspecified part is unexpectedly cleaned by snapcraft
+ Pull stage of an unspecified part is unexpectedly cleaned by snapcraft
Revision history for this message
林博仁(Buo-ren Lin) (brlin) wrote :

I thought the pull stage isn't considered to be "the output of the part"? It's the part's source tree afterall...

Revision history for this message
林博仁(Buo-ren Lin) (brlin) wrote :

Again I'd like to argue that the pull step of poedit part shouldn't be affected by the desktop-gtk3 part and shouldn't be cleaned as a result of changes in the desktop-gtk3 part

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

What I think you really need is a way to specify a remote part that _doesn't_ imply that a local part depends upon it. We have a way to do this but it wasn't fully implemented until https://github.com/snapcore/snapcraft/pull/2153 .

Changed in snapcraft:
status: Triaged → In Progress
assignee: nobody → Kyle Fazzari (kyrofa)
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
milestone: none → 2.43
Changed in snapcraft:
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.