From abdc2a06d590bf895a9b27ee45116b8cf5a6f4c1 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Sun, 10 Mar 2019 10:52:39 +0100 Subject: units:wireless: Fix nm_connection_save/restore ids (category->interface) Using category in identifiers can generate duplicated job ids if more than one wifi device is available on the system: File "/snap/checkbox-foo/z/lib/python3.x/site-packages/plainbox/impl/session/state.py", line 1106, in _add_job_unit raise DependencyDuplicateError(existing_job, new_job) plainbox.impl.depmgr.DependencyDuplicateError: duplicate job id: 'com.canonical.certification::wireless/nm_connection_save_WIRELESS' --- units/wireless/jobs.pxu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/units/wireless/jobs.pxu b/units/wireless/jobs.pxu index a186979..b3d6604 100644 --- a/units/wireless/jobs.pxu +++ b/units/wireless/jobs.pxu @@ -447,7 +447,7 @@ _description: unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' -id: wireless/nm_connection_save_{category} +id: wireless/nm_connection_save_{interface} category_id: com.canonical.plainbox::wireless _summary: Save any NetworkManager 802.11 configurations prior to testing plugin: shell @@ -460,7 +460,7 @@ flags: preserve-locale also-after-suspend also-after-suspend-manual unit: template template-resource: device template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN' -id: wireless/nm_connection_restore_{category} +id: wireless/nm_connection_restore_{interface} category_id: com.canonical.plainbox::wireless _summary: Restore any NetworkManager 802.11 configurations after testing plugin: shell @@ -468,5 +468,5 @@ user: root command: wifi_nmcli_backup.py restore estimated_duration: 2.0 -depends: wireless/nm_connection_save_{category} -flags: preserve-locale also-after-suspend also-after-suspend-manual \ No newline at end of file +depends: wireless/nm_connection_save_{interface} +flags: preserve-locale also-after-suspend also-after-suspend-manual -- cgit v1.2.3