m/n/b/fwprune: fix bug in firmware deduplication

The populatedPaths set was checked for the path relative to
/lib/firmware, but the absolute path was added. This caused the
bailout for duplicate firmware requests to be ineffective.

Found while using this for a weekend project.

Change-Id: I74f6cd0dd7e2da1fc189da8a4d01aba7ac29b837
Reviewed-on: https://review.monogon.dev/c/monogon/+/2264
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/metropolis/node/build/fwprune/main.go b/metropolis/node/build/fwprune/main.go
index c8c8e9c..d1ff16f 100644
--- a/metropolis/node/build/fwprune/main.go
+++ b/metropolis/node/build/fwprune/main.go
@@ -182,7 +182,7 @@
 				Path:       placedPath,
 				TargetPath: linkTarget,
 			})
-			populatedPaths[placedPath] = true
+			populatedPaths[p] = true
 			// Symlinks are relative to their place, resolve them to be relative
 			// to the firmware root directory.
 			chaseReference(path.Join(path.Dir(p), linkTarget))
@@ -200,7 +200,7 @@
 			Mode:       0444,
 			SourcePath: sourcePath,
 		})
-		populatedPaths[path.Join("/lib/firmware", p)] = true
+		populatedPaths[p] = true
 	}
 
 	for _, p := range fwp {