Canonical has revealed plans for a significant overhaul of the Snapcraft toolkit used for building, distributing, and updating self-contained packages in Snap format. It is noted that the current codebase of Snapcraft is considered legacy and will be applied only when there is a need to use old technologies. The radical changes being developed will not affect the current usage model — the old monolithic Snapcraft will continue to be used in projects related to Ubuntu Core 18 and 20, while the new modular Snapcraft will start to be applied beginning with the Ubuntu Core 22 branch.
The old Snapcraft will be replaced by a newer, more compact, and modular version that will simplify the creation of snap packages for developers and eliminate the challenges associated with creating portable packages suitable for use across different distributions. The new Snapcraft is based on the Craft Parts mechanism, which allows for obtaining data from different sources during package building, processing them in various ways, and forming a directory hierarchy in the file system suitable for package deployment. Craft Parts implies the use of portable components in the project that can be independently downloaded, built, and installed.
The choice between the new or old implementation of Snapcraft will be made through a special fallback mechanism integrated into the build process. Thus, existing projects will be able to build snap packages without changes and will only require modification when transitioning packages to the new version of the Ubuntu Core system.
Source: opennet.ru
