Почему снимки такие громоздкие? [duplicate]

Например, в моей системе apt-get необходимо загрузить 3,5 МБ для установки IDE geany, а размер загрузки для моментального снимка составляет 100 МБ. Это так велико и недопустимо! Даже установщик Windows geany имеет размер не более 15,4 МБ!

Какие библиотеки, используемые программным обеспечением, включены в его файл оснастки? А что предполагается уже присутствующим в ОС? Включает ли файл моментальных снимков все необходимые библиотеки? Если это так, то почему? Я не вижу причин, по которым в системе должно присутствовать более одной копии каждой конкретной версии библиотеки, например, GTK.

Возможно, я недостаточно хорошо понял систему привязки. Возможно, размер загрузки каждой привязки зависит от уже установленных привязок. Например, возможно, если другое приложение, установленное с помощью оснастки, использует ту же версию GTK, размер загрузки для установки с привязкой geany будет меньше 100 МБ.

задан 24 July 2020 в 12:48

2 ответа

Correct, Snaps are much bulkier than regular packages because they are an alternative way to distribute and install apps by being self contained by including all their dependencies within themselves.

Advantages of Snaps:

  • Always contain the correct version dependencies that the developer intended - this avoids dependency issues especially common with unmaintained apps on Linux.
  • Run in a self-contained manner on the PC, in some cases this is better security
  • Automatically update in the background
  • Works on any Linux distro
  • User-friendly for new users

Downsides of Snaps:

  • Larger download and install size due to bundling all specific packages, instead of reusing those that may be on the system already.
  • 3rd party maintenance of some Snaps is not great (This is true of all package managers really, but often the Snap may be updated later than the individual packages sometimes by a random 3rd party who may just stop at some point. Generally, popular established apps with a strong organization behind them work well with Snap if the org uses it as their main distribution method, younger/smaller apps less so).
  • While the dependencies are the ones intended by the developer, there might be newer better versions coming out frequently which the app will not use.
  • There may be some extra steps to allow permissions (just like Android or Windows Store apps which are similarly containerized).
  • Centrally controlled by Canonical (i.e. There is only one central Snap repo, nobody can start up their own. In contrast Flatpak is an alternative without this limitation). This might be an advantage for new users who would like the simplicity of just one possible store.
  • Due to running in their own container, sometimes Snap applications do not reflect the current OS theme and style. Though I believe this is partially addressed by installing "common-themes" Snaps that match containerized apps to the current OS theme.

What I personally use Snap for

  • When its a popular app backed by a large organization and the Snap is published directly by that organization. Examples: Blender, Inkscape, VLC. This is key for me personally: Developer must directly and strongly support the use of Snap as a main distribution method.
  • When I encounter bugs which are often due to unforeseen changes in new versions of dependencies. In this case I will try switching to self-contained packages like Snap or Flatpak for that app.

All other instances I would prefer the Ubuntu apt package manager.

Also note that in some cases, if Canonical decides the Snap package is better in all ways than the version of an app you installed via apt, Ubuntu will automatically install the Snap instead without notifying you(!)

ответ дан 30 July 2020 в 22:03

I think you answered your own question. Snaps are bulky because they also include some dependencies, and are thus "self-contained" apps. There are pros and cons.

The reason you would have more than one instance of a library on a system is because there could be different versions required, especially if you're running older apps. I think for newer apps that uses the latest dependencies, this should rarely be an issue.

If you have no dependency issues, there is no real reason to use snaps - this is especially true for servers. For myself, I've had little reason to install snaps over apt packages (also because the snaps I tried was not maintained, and thus had less functionality than the corresponding apt packages).

ответ дан 30 July 2020 в 22:03

Другие вопросы по тегам:

Похожие вопросы: