|
|
|
@ -37,9 +37,10 @@ import (
|
|
|
|
|
"github.com/coreos/clair/pkg/commonerr"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var trackerRepository = "https://launchpad.net/ubuntu-cve-tracker"
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
trackerURI = "https://launchpad.net/ubuntu-cve-tracker"
|
|
|
|
|
trackerRepository = "https://launchpad.net/ubuntu-cve-tracker"
|
|
|
|
|
updaterFlag = "ubuntuUpdater"
|
|
|
|
|
cveURL = "http://people.ubuntu.com/~ubuntu-security/cve/%s"
|
|
|
|
|
)
|
|
|
|
@ -175,6 +176,10 @@ func (u *updater) Clean() {
|
|
|
|
|
os.RemoveAll(u.repositoryLocalPath)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (u *updater) SetSourceUrl(sourceURL string) {
|
|
|
|
|
trackerRepository = sourceURL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (u *updater) pullRepository() (err error) {
|
|
|
|
|
// Determine whether we should branch or pull.
|
|
|
|
|
if _, pathExists := os.Stat(u.repositoryLocalPath); u.repositoryLocalPath == "" || os.IsNotExist(pathExists) {
|
|
|
|
|