update-manager 1:18.04.11 (Accepted)

I saw this upload to bionic today and a similar one for a different
package yesterday and had some questions about it.

Why is it necessary to modify individual packages so that GNOME
Software won't uninstall them?

Is update-manager being a dependency of ubuntu-desktop not enough to
prevent it from being uninstalled?

If it is necessary to modify every package which a metapackage depends
on how is this work being tracked?

What checks are in place to ensure that no packages are missed and that
new additions get appropriately changed?

----- Forwarded message from Jeremy Bicha < ... at ubuntu dot com> -----

update-manager (1:18.04.11) bionic; urgency=medium

* Add Appstream metadata with compulsory_for_desktop fields to prevent
the accidental uninstallation of ubuntu-desktop in GNOME Software.
ubuntu-desktop depends on update-manager.
* Build-Depend on dh-python
* Update translation template



Re: update-manager 1:18.04.11 (Accepted

By Jeremy Bicha at 04/13/2018 - 14:53

On Fri, Apr 13, 2018 at 1:13 PM, Brian Murray < ... at ubuntu dot com> wrote:
Thank you for asking.

GNOME Software does not notify the user about dependencies that will
be uninstalled. Packages and dependencies are details that are not
exposed at all to users of GNOME Software.

Nothing is tracking this. I am making sure that the AppStream metadata
is in place and set correctly for ubuntu-desktop only. The apps that
are depends of ubuntu-desktop are gnome-control-center, nautilus,
software-properties-gtk, update-manager, and yelp. Recommends are not
a problem as they can be removed without removing the metapackage.

(I have also removed the compulsory-for-GNOME tag from epiphany and totem.)

This has been an issue since Ubuntu 16.04 LTS but it wasn't a big
enough priority to anyone to fix until now.

I wasn't planning on backporting this to 16.04 but it could be done by someone.

Jeremy Bicha

Re: update-manager 1:18.04.11 (Accepted

By Steve Langasek at 04/13/2018 - 15:17

On Fri, Apr 13, 2018 at 02:53:13PM -0400, Jeremy Bicha wrote:
I am concerned about the model here by which individual packages need to add
blobs of metadata on the filesystem to declare themselves "not for removal".
This is completely disconnected from the existing logic for managing
metapackages, which is expressed through the central Packages files and
apt's logic for metapackage dependencies.

Why is GNOME Software removing dependencies of packages /at all/? Why are
the decisions about dependency removal not being delegated to apt, instead
of being reimplemented poorly?

Re: update-manager 1:18.04.11 (Accepted

By Julian Andres Klode at 04/13/2018 - 15:21

On Fri, Apr 13, 2018 at 12:17:16PM -0700, Steve Langasek wrote:
I don't believe PackageKit/GNOME Software does anything different here.
What happens is that e.g. ubuntu-desktop depends on nautilus, but if you
remove nautilus, ubuntu-desktop is removed too. That's the same in APT
and PackageKit.

What I feel like should happen is to automatically generate compulsory
metadata in appstream generator from task fields or something.

Re: update-manager 1:18.04.11 (Accepted

By Iain Lane at 04/16/2018 - 05:32

On Fri, Apr 13, 2018 at 09:21:19PM +0200, Julian Andres Klode wrote:
That could be done, but not from Task fields in isolation IMO. For
ubuntu-desktop we have most applications as recommends, not depends,
precisely because we want people to be able to remove them. Indeed this
cycle we added a new "minimal" option to the installer that makes use of

For *dependencies* of the metapackage, though, generating
compulsory_for_desktop metadata makes sense. You just need to know what
to generate it for: the $XDG_CURRENT_DESKTOP value for the seed's
corresponding desktop session. It'd probably have to be a hardcoded
list, I guess, and appstream-generator could consider this as an
additional data source when it generates a particular component.

A slight variant is that it would also be possible to generate this out
of band (but probably on the same machine as runs the
appstream-generator so that it can be easily fetched by LP) and ship a
new "merge" type AppStream file through the archive. In that case we'd
also need an apt.conf.d snippet to cause it to be downloaded.

FAOD I don't plan to work on this, but I could discuss & review a


Re: update-manager 1:18.04.11 (Accepted

By Steve Langasek at 04/13/2018 - 15:29

Agreed. This would also address the problem that appstream data will again
become out of date whenever an app is dropped from a seed.

So how do we make this happen?

Re: update-manager 1:18.04.11 (Accepted

By Brian Murray at 04/13/2018 - 15:15

On Fri, Apr 13, 2018 at 02:53:13PM -0400, Jeremy Bicha wrote:
Won't this same work, setting up AppStream metadata, need to happen for
every Ubuntu flavor that includes GNOME software? [I just tried
uninstalling abiword on a Lubuntu 18.04 system and lubuntu-desktop was
also removed.]

Is there no way to sort this out in GNOME software?