Snaps Add Flexibility with Tracks

by Alan Pope on 19 July 2018

Snap packages have a rich set of features beyond getting the latest shiny on your Linux distribution. Tracks enable developers to publish multiple supported releases of their application under the same name. With this enabled, a user can switch tracks at any time to install and use an alternate supported relase of software.

Within each track are four standard channels named edge, beta, candidate and stable. The channels represent the risk-level users should expect from the snaps within. Edge snaps (typically built from the latest code committed) would be riskier to use than beta releases, which are more risky than stable releases.

By default every application has one ‘latest’ track and the four named channels. Developers can optionally choose whether to supplement that with additional tracks. Further the developer can choose which channels to use within those tracks.

This is best illustrated with an example such as Skype. Running ‘snap info skype’ will reveal the ‘channel map’ at the bottom. The Skype developers have chosen to use two tracks, the ‘latest’ (default) and ‘insider’ track. Any user installing Skype without specifying a track or channel should expect to receive whatever is in the latest/stable track/channel.

Skype makes use of the insider track to publish newer builds of their software, intended for use by their QA team who are testing the next stable release. Users can switch to the public insider/stable track to join the testing, or confirm a bug which exists in the latest/stable release is already fixed.

Installing from a track/channel can be done on the command line:-

snap install skype --channel=insider/stable

A user who already has Skype installed can switch channel with the snap refresh command:-

snap refresh skype --channel=insider/stable

Alternatively if using GNOME Software, select the ‘stable’ channel in the store page for Skype, and select a channel to switch to.

In the example we’ve looked at, the Skype developers have chosen to support two tracks – latest and insider. Other developers are supporting many more. The NodeJS and etcd projects have many tracks covering all the supported releases of their software. This enables users to select a software release series and get updates to that major version without being unexpectedly upgraded to the next software series.

For users who prefer to stay on the the most recent published release of software, the latest/stable track and channel is most appropriate. The software will get upgraded at the point when the developer pushes a new release to the latest track, stable channel. Users can switch between tracks/channels at any time, going both forwards and backwards in releases if necessary.

Tracks increase flexibility for developers, access to latest builds for QA teams, and more choice for users.

Newsletter Signup

Related posts

Snapcraft:多应用客户端-服务端snap开发教程

在过去几个月我们发布了一些如何使用Rust,Java,C/C++和其他语言来开发snap桌面应用的文章。在这些从入门到精通的教程中,我们以一个代表性的snapcraft.yaml文件来介绍开发构建snap所需的具体细节。 今天,我们希望脱离这一过程,而将重点放在服务器端。我们将为你提供一个包含两个有趣组件的snapcraft.yaml的概述:a)它将拥有多个应用程序; 通常,snap包含一个应用程序。b)它具有简单的后台服务,其他应用程序可以连接到该服务。 我们一起来看一下。 Snapcraft yaml 以下是snapcraft.yaml文件的内容: apps: borg: command: bin/borg daemon: simple restart-conditi […]

Learn snapcraft by example – multi-app client-server snap

Over the past few months, we published a number of articles showing how to snap desktop applications written in different languages – Rust, Java, C/C++, and others. In each one of these zero-to-hero guides, we went through a representative snapcraft.yaml file and highlighted the specific bits and pieces developers need to successfully bui […]

Snapcraft tricks: Improve release flexibility with pull and build overrides

Sometimes, software projects are simple – one architecture, one version, one release. But often, they can be complex, targeting multiple platforms, and with different versions at that. If you are packaging your apps as snaps, you might wonder about the optimal way to accommodate a multi-dimensional release matrix. One yaml to rule them al […]