Merge ~jocave/plainbox-provider-resource:kernel-extraction-uc20 into plainbox-provider-resource:master

Proposed by Jonathan Cave
Status: Merged
Approved by: Jonathan Cave
Approved revision: 2fdc999f8aebd8d986601ee73d82c9128a9ede60
Merged at revision: 01853c4731bde976ad75b8a468372ab2aa715b57
Proposed branch: ~jocave/plainbox-provider-resource:kernel-extraction-uc20
Merge into: plainbox-provider-resource:master
Diff against target: 23 lines (+5/-0)
1 file modified
bin/snapd_resource.py (+5/-0)
Reviewer Review Type Date Requested Status
Devices Certification Bot Needs Fixing
Maciej Kisielewski Approve
Review via email: mp+391218@code.launchpad.net

Description of the change

Simplest option for this flag that is no longer needed on UC20 is just to set it to always True. This means there is no need to jump through hoops in jobs that rely on this resource elsewhere. Let me know if you think if this is cheating!

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

It is cheating. I like it. +1

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[xenial] [12:04:17] starting container
Device project added to xenial-testing
[focal] [12:04:23] starting container
Device project added to focal-testing
[xenial] [12:04:29] provisioning container
[focal] [12:04:38] provisioning container
[xenial] [12:04:44] Starting tests...
[xenial] Found a test script: ./requirements/container-tests-provider-resource-generic
[focal] [12:05:12] Starting tests...
[focal] Found a test script: ./requirements/container-tests-provider-resource-generic
[bionic] [12:05:54] starting container
Device project added to bionic-testing
[bionic] [12:06:08] provisioning container
[bionic] [12:06:31] Starting tests...
[bionic] Found a test script: ./requirements/container-tests-provider-resource-generic
[focal] [12:10:45] container-tests-provider-resource-generic: FAIL
[xenial] [12:10:48] container-tests-provider-resource-generic: FAIL
[focal] output: https://paste.ubuntu.com/p/bT9q2J2Qm2/
[focal] [12:10:48] Fixing file permissions in source directory
[focal] [12:10:48] Destroying container
[xenial] output: https://paste.ubuntu.com/p/fgQ7p7Kc9n/
[xenial] [12:10:50] Fixing file permissions in source directory
[xenial] [12:10:51] Destroying container
[bionic] [12:11:03] container-tests-provider-resource-generic: FAIL
[bionic] output: https://paste.ubuntu.com/p/cNhQdCKz6P/
[bionic] [12:11:06] Fixing file permissions in source directory
[bionic] [12:11:06] Destroying container

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bin/snapd_resource.py b/bin/snapd_resource.py
index fa3ef46..409acb1 100755
--- a/bin/snapd_resource.py
+++ b/bin/snapd_resource.py
@@ -15,6 +15,7 @@ from checkbox_support.snap_utils.asserts import model_to_resource
15from checkbox_support.snap_utils.asserts import serial_to_resource15from checkbox_support.snap_utils.asserts import serial_to_resource
16from checkbox_support.snap_utils.snapd import Snapd16from checkbox_support.snap_utils.snapd import Snapd
17from checkbox_support.snap_utils.system import get_kernel_snap17from checkbox_support.snap_utils.system import get_kernel_snap
18from checkbox_support.snap_utils.system import get_series
1819
19from collections import namedtuple20from collections import namedtuple
2021
@@ -176,6 +177,10 @@ class Features():
176 encryption as it ensures that the kernel.img is available to the177 encryption as it ensures that the kernel.img is available to the
177 bootloader prior to decrypting the writable partition.178 bootloader prior to decrypting the writable partition.
178 '''179 '''
180 # UC 20 no longer requires file presence
181 if int(get_series()) >= 20:
182 print('force_kernel_extraction: True')
183 return
179 snap = get_kernel_snap()184 snap = get_kernel_snap()
180 if snap is not None:185 if snap is not None:
181 feature_f = '/snap/{}/current/meta/force-kernel-extraction'.format(186 feature_f = '/snap/{}/current/meta/force-kernel-extraction'.format(

Subscribers

People subscribed via source and target branches