From 4650003e3da75c66470eb73c3727e57701682084 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@amd.com>
Date: Sat, 26 Apr 2025 20:48:17 -0500
Subject: [PATCH] trivial: only use google pixel fastboot device on unsupported
 builds

This is marked as a pixel3a, but it actually applies to a pixel 9
as well.  We don't plan to be flashing pixel devices with fwupd
and this could cause problems with things like /usr/bin/fastboot
if fwupd takes the device.

As it's only really useful for test coverage, only install the quirk
on unsupported builds so that distros don't pick it up.
---
 plugins/fastboot/ci.quirk       | 3 +++
 plugins/fastboot/fastboot.quirk | 4 ----
 plugins/fastboot/meson.build    | 7 +++++--
 3 files changed, 8 insertions(+), 6 deletions(-)
 create mode 100644 plugins/fastboot/ci.quirk

diff --git a/plugins/fastboot/ci.quirk b/plugins/fastboot/ci.quirk
new file mode 100644
index 000000000..86a897064
--- /dev/null
+++ b/plugins/fastboot/ci.quirk
@@ -0,0 +1,3 @@
+# Google Pixel 3a
+[USB\VID_18D1&PID_4EE0]
+Plugin = fastboot
diff --git a/plugins/fastboot/fastboot.quirk b/plugins/fastboot/fastboot.quirk
index 5170c8de9..1b3abf4a1 100644
--- a/plugins/fastboot/fastboot.quirk
+++ b/plugins/fastboot/fastboot.quirk
@@ -39,7 +39,3 @@ CounterpartGuid = USB\VID_0489&PID_E0B4
 Plugin = fastboot
 Summary = Foxconn T77w968/eSIM LTE modem (fastboot)
 CounterpartGuid = USB\VID_0489&PID_E0B5
-
-# Google Pixel 3a
-[USB\VID_18D1&PID_4EE0]
-Plugin = fastboot
diff --git a/plugins/fastboot/meson.build b/plugins/fastboot/meson.build
index ddb8aa62c..679e661be 100644
--- a/plugins/fastboot/meson.build
+++ b/plugins/fastboot/meson.build
@@ -13,5 +13,8 @@ plugin_builtins += static_library('fu_plugin_fastboot',
   dependencies: plugin_deps,
 )
 
-enumeration_data += files('tests/fastboot-google-sargo-setup.json')
-device_tests += files('tests/fastboot-google-sargo.json')
+if not supported_build
+  plugin_quirks += files('ci.quirk')
+  enumeration_data += files('tests/fastboot-google-sargo-setup.json')
+  device_tests += files('tests/fastboot-google-sargo.json')
+endif
-- 
2.43.0

