Ensure Uninstall option appears for Linux apps

Fixes an issue where the Uninstall option would not appear after
installing some Linux apps. This was because the desktop file for the
app was created before the installation was finished. When garcon
noticed the new desktop and asked PackageKit if a package owned the
file, PackageKit said no because the owning package wasn't fully
installed.

Worked around this by adding a post-install hook to dpkg which will
touch a file in the /usr/share/applications directory after each install
is finished. garcon will notice the file change and rescan after the
install is done. The second scan should see that the desktop is owned by
the now-fully-installed package.

Alternatives considered: I tried to have garcon look at the dpkg lock
and only do the scan when dpkg wasn't in the middle of an operation.
This didn't work because garcon doesn't run as root and can't open the
dpkg lock file.

BUG=chromium:898295
TEST=Installed various packages, especially eclipse, both using apt-get
install and right-clicking the .deb file in Files app. Ensured uninstall
option appeared consistently.

Change-Id: I04605356afe7dfdd7bf9c70a4a3982e58b9dc8fa
Reviewed-on: https://chromium-review.googlesource.com/1468041
Commit-Ready: Ian Barkley-Yeung <iby@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
2 files changed
tree: 9a3d522a106e1996d77411588da78a7e88771ac0
  1. cros-adapta/
  2. cros-apt-config/
  3. cros-garcon/
  4. cros-guest-tools/
  5. cros-notificationd/
  6. cros-pulse-config/
  7. cros-sftp/
  8. cros-sommelier/
  9. cros-sommelier-config/
  10. cros-sudo-config/
  11. cros-systemd-overrides/
  12. cros-tast-tests/
  13. cros-ui-config/
  14. cros-wayland/
  15. docs/
  16. kokoro/
  17. lxd/
  18. .gitignore
  19. LICENSE
  20. README.md
  21. WORKSPACE
README.md

cros-container-guest-tools

Overview

These are the guest packages for setting up a container to integrate with Chrome OS. This includes build scripts that are run in Google's internal continuous integration service.

Building

The guest packages can be built with Bazel. The CrOS milestone to target and release name (stretch, buster, etc.) are required.

bazel build //... --action_env="MILESTONE=74" --action_env="RELEASE=buster"