When a step is dirty, snapcraft doesn't autoclean and reexecute it
Bug #1647907 reported by
Leo Arias
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
In a python snap, I changed the python-version and then re-run the snapcraft command. I got this:
The 'pull' step of 'my-part' is out of date:
The 'python-version' part property appears to have changed.
Please clean that part's 'pull' step in order to continue
I think that this message should never be displayed to the user. Instead, we should notice that the part is dirty, clean it, and continue.
Changed in snapcraft: | |
status: | New → Confirmed |
Changed in snapcraft: | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
I have mixed feelings about this, which is one of the reasons we've been so conservative about it. Take this scenario:
I'm building mysql on a raspberry pi 2 (something I was doing back in the day). It takes HOURS, most of the workday in fact. It finally finishes building, and I realize that I'm missing a stage package. Since it's related to the mysql part I add it to the mysql part's stage-packages. I then run snapcraft again. Here's where reality splits:
1) We have today's snapcraft. It says "The 'pull' step of 'mysql' is out of date. Blah blah you added a stage package, please clean that part's step in order to continue." I think "oh, that's not what I want, I just spent all day building it! I'll add another part with this stage package instead."
2) We have the auto-cleaning snapcraft that you suggest. It automatically cleans the mysql step all the way back to pull and starts over. I throw my hands up in frustration and have lost a day's build.
I admit: neither of these realities is good. They both provide bad experiences. Is there a middle ground somewhere? Would it be terrible to prompt?