$ snapcraft clean --step=build assets
Cleaning build step (and all subsequent steps) for assets
$ tree parts/assets/install/
parts/assets/install/
└── bin
└── my-awesome-app-launch
Source: https://github.com/Lin-Buo-Ren/snapcrafters-template-plus
Snapcraft version 2.43 installed via APT.
Also, this is what I found after running snapcraft clean assets
:
parts/assets/
├── build
│ ├── gui
│ │ ├── my-awesome-app.desktop
│ │ ├── my-awesome-app.png
│ │ └── README.md
│ ├── launchers
│ │ ├── my-awesome-app-launch
│ │ └── README.md
│ ├── patches
│ │ └── README.md
│ ├── README.md
│ ├── screenshots
│ │ └── README.md
│ └── utilities
│ ├── install-assets.bash
│ ├── patch-desktop-entries.bash
│ ├── patch-desktop-entries.sed
│ ├── README.md
│ └── set-snap-version.bash
└── install
└── bin
└── my-awesome-app-launch
8 directories, 14 files
:-/ The problem is not reproduced after I do a full snapcraft clean
snapcraft keeps state of changes in some internal files it uses, it might be the case that that either got corrupted or deleted somehow.
If it happens again, and you do not mind, maybe store the directory for the project that is failing somewhere else for safe keeping so we can figure out exactly what happened.
1 Like
I currently have an unverified theory: previously I tested docker build for a bit and it creates root
owned files under the snapcraft directories, which cannot be removed when snapcraft is run in a regular/LXD environment.
The potential problem is that snapcraft doesn’t report permission denied error somehow when encountering these files during cleaning, thus leaving the files intact without the user even noticed.
UPDATE: Nope, snapcraft clearly bails out properly in such condition, so it’s another problem.