generated from canonical/starbase
-
Notifications
You must be signed in to change notification settings - Fork 19
Labels
Description
What needs to get done
If we're running from a snap, we currently inject the app snap from the host. See:
craft-application/craft_application/services/provider.py
Lines 122 to 141 in 141b727
| if util.is_running_from_snap(self._app.name): | |
| # use the aliased name of the snap when injecting | |
| name = os.getenv("SNAP_INSTANCE_NAME", self._app.name) | |
| channel = None | |
| emit.debug( | |
| f"Setting {self._app.name} to be injected from the " | |
| "host into the build environment because it is running " | |
| "as a snap." | |
| ) | |
| else: | |
| # use the snap name when installing from the store | |
| name = self._app.name | |
| channel = os.getenv("CRAFT_SNAP_CHANNEL", "latest/stable") | |
| emit.debug( | |
| f"Setting {self._app.name} to be installed from the {channel} " | |
| "channel in the build environment because it is not running " | |
| "as a snap." | |
| ) | |
| self.snaps.append(Snap(name=name, channel=channel, classic=True)) |
We should inject the base snap that the app is using from the host as well.
Why it needs to get done
If the managed instance doesn't have this base snap (e.g. the app uses core24 and we're building on a 22.04 managed instance), the instance is currently downloading the base snap.
Copilot