aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Mentovai <mark@chromium.org>2019-06-18 10:48:04 -0400
committerMark Mentovai <mark@chromium.org>2019-06-18 15:01:25 +0000
commita7d686086ca59beaf8df2793f42be8ec814e4167 (patch)
treef2750aa38aa37c580d587bc4830578d9ed4b41f9 /src
parentMac upload_system_symbols: use log.Fatalf where formatting is desired (diff)
downloadbreakpad-a7d686086ca59beaf8df2793f42be8ec814e4167.tar.xz
Mac upload_system_symbols: make dump of /Library/QuickTime optional
/Library/QuickTime is gone in 10.15b2 19A487l. Change-Id: I927350a9cb383b93e8b18aef5f36c77bb67fede1 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1663996 Reviewed-by: Robert Sesek <rsesek@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/tools/mac/upload_system_symbols/upload_system_symbols.go20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/tools/mac/upload_system_symbols/upload_system_symbols.go b/src/tools/mac/upload_system_symbols/upload_system_symbols.go
index 0ff01a00..05a7764a 100644
--- a/src/tools/mac/upload_system_symbols/upload_system_symbols.go
+++ b/src/tools/mac/upload_system_symbols/upload_system_symbols.go
@@ -69,13 +69,18 @@ var (
var (
// pathsToScan are the subpaths in the systemRoot that should be scanned for shared libraries.
pathsToScan = []string{
- "/Library/QuickTime",
"/System/Library/Components",
"/System/Library/Frameworks",
"/System/Library/PrivateFrameworks",
"/usr/lib",
}
+ // optionalPathsToScan is just like pathsToScan, but the paths are permitted to be absent.
+ optionalPathsToScan = []string{
+ // Gone in 10.15.
+ "/Library/QuickTime",
+ }
+
// uploadServers are the list of servers to which symbols should be uploaded.
uploadServers = []string{
"https://clients2.google.com/cr/symbol",
@@ -322,7 +327,11 @@ func findLibsInRoot(root string, dq *DumpQueue) {
fq.WorkerPool = StartWorkerPool(12, fq.worker)
for _, p := range pathsToScan {
- fq.findLibsInPath(path.Join(root, p))
+ fq.findLibsInPath(path.Join(root, p), true)
+ }
+
+ for _, p := range optionalPathsToScan {
+ fq.findLibsInPath(path.Join(root, p), false)
}
close(fq.queue)
@@ -332,9 +341,12 @@ func findLibsInRoot(root string, dq *DumpQueue) {
// findLibsInPath recursively walks the directory tree, sending file paths to
// test for being Mach-O to the findQueue.
-func (fq *findQueue) findLibsInPath(loc string) {
+func (fq *findQueue) findLibsInPath(loc string, mustExist bool) {
d, err := os.Open(loc)
if err != nil {
+ if !mustExist && os.IsNotExist(err) {
+ return
+ }
log.Fatalf("Could not open %s: %v", loc, err)
}
defer d.Close()
@@ -348,7 +360,7 @@ func (fq *findQueue) findLibsInPath(loc string) {
for _, fi := range fis {
fp := path.Join(loc, fi.Name())
if fi.IsDir() {
- fq.findLibsInPath(fp)
+ fq.findLibsInPath(fp, true)
continue
} else if fi.Mode()&os.ModeSymlink != 0 {
continue