File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (49 lines) | stat: -rw-r--r-- 2,275 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
summary: The packagekit-control interface grants access to PackageKit

details: |
    The packagekit-control interface allows access to the now-deprecated Package
    Kit service, which exposes D-Bus methods for managing classic packages on
    the host.

systems:
    # Ubuntu Core does not provide a packagekitd implementation
    - -ubuntu-core-*
    # Ubuntu 14.04 PackageKit seems to be too old
    - -ubuntu-14.04-*
    # Arm64 is not supported
    - -ubuntu-*-arm-64

restore: |
    snap remove --purge test-snapd-packagekit

execute: |
    echo "Installing test-snapd-packagekit"
    snap install --edge test-snapd-packagekit

    echo "The packagekit-control plug is disconnected by default"
    snap connections test-snapd-packagekit | MATCH "packagekit-control +test-snapd-packagekit:packagekit-control +- +-"
    if [ "$(snap debug confinement)" = strict ]; then
        echo "Access to PackageKit is blocked without"
        test-snapd-packagekit.pkcon backend-details | MATCH "Failed to contact PackageKit"
    fi

    echo "The plug can be connected"
    snap connect test-snapd-packagekit:packagekit-control
    snap connections test-snapd-packagekit | MATCH "packagekit-control +test-snapd-packagekit:packagekit-control +:packagekit-control +manual"

    echo "With the plug connected it is possible to communicate with packagekit"
    if test-snapd-packagekit.pkcon backend-details | grep -qF 'setting the proxy failed'; then
        # Some versions of PackageKit cannot handle the presence of commonly
        # used proxy environment variables. Specifically those that lack the patch
        # 4626cc3bec7affb632122b1d3d4898d7a5bd0e7d (pk-engine:
        # https://bugzilla.redhat.com/show_bug.cgi?id=1348843 Fix checking
        # D-Bus caller details when setting proxy).
        #
        # Since the proxy is there for a reason, do a compromise and unset the
        # variables do an offline request to see backend details and quit.
        unset HTTP_PROXY http_proxy HTTPS_PROXY https_proxy NO_PROXY no_proxy
        test-snapd-packagekit.pkcon backend-details | MATCH "Name:"
    else
        test-snapd-packagekit.pkcon backend-details | MATCH "Name:"
        test-snapd-packagekit.pkcon resolve snapd | MATCH "Installed[[:space:]]+snapd"
    fi