| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package local | 5 package local |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "crypto/sha1" | 8 "crypto/sha1" |
| 9 "encoding/base64" | 9 "encoding/base64" |
| 10 "fmt" | 10 "fmt" |
| 11 "io/ioutil" | 11 "io/ioutil" |
| 12 "os" | 12 "os" |
| 13 "path/filepath" | 13 "path/filepath" |
| 14 "sort" | 14 "sort" |
| 15 "strings" | 15 "strings" |
| 16 "sync" | 16 "sync" |
| 17 "time" | 17 "time" |
| 18 | 18 |
| 19 » "infra/libs/logging" | 19 » "github.com/luci/luci-go/common/logging" |
| 20 |
| 20 "infra/tools/cipd/common" | 21 "infra/tools/cipd/common" |
| 21 ) | 22 ) |
| 22 | 23 |
| 23 // TODO(vadimsh): Make it work on Windows. | 24 // TODO(vadimsh): Make it work on Windows. |
| 24 | 25 |
| 25 // TODO(vadimsh): How to handle path conflicts between two packages? Currently | 26 // TODO(vadimsh): How to handle path conflicts between two packages? Currently |
| 26 // the last one installed wins. | 27 // the last one installed wins. |
| 27 | 28 |
| 28 // File system layout of a site directory <root>: | 29 // File system layout of a site directory <root>: |
| 29 // <root>/.cipd/pkgs/ | 30 // <root>/.cipd/pkgs/ |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 // diff returns set(a) - set(b). | 519 // diff returns set(a) - set(b). |
| 519 func (a stringSet) diff(b stringSet) stringSet { | 520 func (a stringSet) diff(b stringSet) stringSet { |
| 520 out := makeStringSet() | 521 out := makeStringSet() |
| 521 for elem := range a { | 522 for elem := range a { |
| 522 if _, ok := b[elem]; !ok { | 523 if _, ok := b[elem]; !ok { |
| 523 out.add(elem) | 524 out.add(elem) |
| 524 } | 525 } |
| 525 } | 526 } |
| 526 return out | 527 return out |
| 527 } | 528 } |
| OLD | NEW |