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>
This commit is contained in:
parent
9575315d8b
commit
a7d686086c
1 changed files with 16 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue