mirror of
https://github.com/mudler/luet.git
synced 2025-09-06 01:30:29 +00:00
Update vendor github.com/Sabayon/pkgs-checker
This commit is contained in:
4
go.mod
4
go.mod
@@ -4,7 +4,8 @@ go 1.12
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/DataDog/zstd v1.4.4 // indirect
|
github.com/DataDog/zstd v1.4.4 // indirect
|
||||||
github.com/Sabayon/pkgs-checker v0.4.2-0.20200101193228-1d500105afb7
|
github.com/MottainaiCI/simplestreams-builder v0.0.0-20190710131531-efb382161f56 // indirect
|
||||||
|
github.com/Sabayon/pkgs-checker v0.5.1-0.20200221202320-073693f2c657
|
||||||
github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154
|
github.com/asdine/storm v0.0.0-20190418133842-e0f77eada154
|
||||||
github.com/briandowns/spinner v1.7.0
|
github.com/briandowns/spinner v1.7.0
|
||||||
github.com/cavaliercoder/grab v2.0.0+incompatible
|
github.com/cavaliercoder/grab v2.0.0+incompatible
|
||||||
@@ -12,6 +13,7 @@ require (
|
|||||||
github.com/docker/docker v0.7.3-0.20180827131323-0c5f8d2b9b23
|
github.com/docker/docker v0.7.3-0.20180827131323-0c5f8d2b9b23
|
||||||
github.com/ecooper/qlearning v0.0.0-20160612200101-3075011a69fd
|
github.com/ecooper/qlearning v0.0.0-20160612200101-3075011a69fd
|
||||||
github.com/ghodss/yaml v1.0.0
|
github.com/ghodss/yaml v1.0.0
|
||||||
|
github.com/go-yaml/yaml v2.1.0+incompatible // indirect
|
||||||
github.com/hashicorp/go-version v1.2.0
|
github.com/hashicorp/go-version v1.2.0
|
||||||
github.com/jinzhu/copier v0.0.0-20180308034124-7e38e58719c3
|
github.com/jinzhu/copier v0.0.0-20180308034124-7e38e58719c3
|
||||||
github.com/klauspost/pgzip v1.2.1
|
github.com/klauspost/pgzip v1.2.1
|
||||||
|
7
go.sum
7
go.sum
@@ -9,11 +9,16 @@ github.com/Microsoft/go-winio v0.4.11 h1:zoIOcVf0xPN1tnMVbTtEdI+P8OofVk3NObnwOQ6
|
|||||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||||
github.com/Microsoft/hcsshim v0.8.6 h1:ZfF0+zZeYdzMIVMZHKtDKJvLHj76XCuVae/jNkjj0IA=
|
github.com/Microsoft/hcsshim v0.8.6 h1:ZfF0+zZeYdzMIVMZHKtDKJvLHj76XCuVae/jNkjj0IA=
|
||||||
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||||
|
github.com/MottainaiCI/simplestreams-builder v0.0.0-20190710131531-efb382161f56 h1:XCZM9J5KqLsr5NqtrZuXiD3X5fe5IfgU7IIUZzpeFBk=
|
||||||
|
github.com/MottainaiCI/simplestreams-builder v0.0.0-20190710131531-efb382161f56/go.mod h1:+Gbv6dg6TPHWq4oDjZY1vn978PLCEZ2hOu8kvn+S7t4=
|
||||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
|
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
|
||||||
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
|
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
|
||||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||||
github.com/Sabayon/pkgs-checker v0.4.2-0.20200101193228-1d500105afb7 h1:Vf80sSLu1ZWjjMmUKhw0FqM43lEOvT8O5B22NaHB6AQ=
|
github.com/Sabayon/pkgs-checker v0.4.2-0.20200101193228-1d500105afb7 h1:Vf80sSLu1ZWjjMmUKhw0FqM43lEOvT8O5B22NaHB6AQ=
|
||||||
github.com/Sabayon/pkgs-checker v0.4.2-0.20200101193228-1d500105afb7/go.mod h1:GFGM6ZzSE5owdGgjLnulj0+Vt9UTd5LFGmB2AOVPYrE=
|
github.com/Sabayon/pkgs-checker v0.4.2-0.20200101193228-1d500105afb7/go.mod h1:GFGM6ZzSE5owdGgjLnulj0+Vt9UTd5LFGmB2AOVPYrE=
|
||||||
|
github.com/Sabayon/pkgs-checker v0.5.0 h1:VRyyAxo6ox41Dytyl+K+QC+Tps0IxvqYbidu+AH+HUQ=
|
||||||
|
github.com/Sabayon/pkgs-checker v0.5.1-0.20200221202320-073693f2c657 h1:VK5S2Gh9kPUxX81zCFUgKVQn+hFy6VgyZMD3QLm76u8=
|
||||||
|
github.com/Sabayon/pkgs-checker v0.5.1-0.20200221202320-073693f2c657/go.mod h1:GFGM6ZzSE5owdGgjLnulj0+Vt9UTd5LFGmB2AOVPYrE=
|
||||||
github.com/Sereal/Sereal v0.0.0-20181211220259-509a78ddbda3 h1:Xu7z47ZiE/J+sKXHZMGxEor/oY2q6dq51fkO0JqdSwY=
|
github.com/Sereal/Sereal v0.0.0-20181211220259-509a78ddbda3 h1:Xu7z47ZiE/J+sKXHZMGxEor/oY2q6dq51fkO0JqdSwY=
|
||||||
github.com/Sereal/Sereal v0.0.0-20181211220259-509a78ddbda3/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM=
|
github.com/Sereal/Sereal v0.0.0-20181211220259-509a78ddbda3/go.mod h1:D0JMgToj/WdxCgd30Kc1UcA9E+WdZoJqeVOuYW7iTBM=
|
||||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
@@ -91,6 +96,8 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
|
|||||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||||
|
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
|
||||||
|
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
|
||||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
|
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
|
||||||
|
118
vendor/github.com/Sabayon/pkgs-checker/pkg/gentoo/pkg.go
generated
vendored
118
vendor/github.com/Sabayon/pkgs-checker/pkg/gentoo/pkg.go
generated
vendored
@@ -54,11 +54,17 @@ const (
|
|||||||
PkgCondMatchVersion = 8
|
PkgCondMatchVersion = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
RegexCatString = `(^[a-z]+[0-9]*[a-z]*[-][a-z]+[0-9]*[a-z]*|^virtual)`
|
||||||
|
RegexPkgNameString = `([a-z]+[0-9a-zA-Z\-[+]*]*[+]*)`
|
||||||
|
)
|
||||||
|
|
||||||
type GentooPackage struct {
|
type GentooPackage struct {
|
||||||
Name string `json:"name",omitempty"`
|
Name string `json:"name",omitempty"`
|
||||||
Category string `json:"category",omitempty"`
|
Category string `json:"category",omitempty"`
|
||||||
Version string `json:"version",omitempty"`
|
Version string `json:"version",omitempty"`
|
||||||
VersionSuffix string `json:"version_suffix",omitempty"`
|
VersionSuffix string `json:"version_suffix",omitempty"`
|
||||||
|
VersionBuild string `json:"version_build",omitempty"`
|
||||||
Slot string `json:"slot",omitempty"`
|
Slot string `json:"slot",omitempty"`
|
||||||
Condition PackageCond
|
Condition PackageCond
|
||||||
Repository string `json:"repository",omitempty"`
|
Repository string `json:"repository",omitempty"`
|
||||||
@@ -191,14 +197,23 @@ func (p *GentooPackage) Admit(i *GentooPackage) (bool, error) {
|
|||||||
fmt.Sprintf("Wrong name for package %s", i.Name))
|
fmt.Sprintf("Wrong name for package %s", i.Name))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Version != "" {
|
v1s := p.Version
|
||||||
v1, err = version.NewVersion(p.Version)
|
v2s := i.Version
|
||||||
|
|
||||||
|
if v1s != "" {
|
||||||
|
if p.VersionBuild != "" {
|
||||||
|
v1s = p.Version + "+" + p.VersionBuild
|
||||||
|
}
|
||||||
|
v1, err = version.NewVersion(v1s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if i.Version != "" {
|
if v2s != "" {
|
||||||
v2, err = version.NewVersion(i.Version)
|
if i.VersionBuild != "" {
|
||||||
|
v2s = i.Version + "+" + i.VersionBuild
|
||||||
|
}
|
||||||
|
v2, err = version.NewVersion(v2s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
@@ -210,7 +225,8 @@ func (p *GentooPackage) Admit(i *GentooPackage) (bool, error) {
|
|||||||
} else {
|
} else {
|
||||||
if p.Condition == PkgCondInvalid || p.Condition == PkgCondEqual {
|
if p.Condition == PkgCondInvalid || p.Condition == PkgCondEqual {
|
||||||
// case 1: source-pkg-1.0 and dest-pkg-1.0 or dest-pkg without version
|
// case 1: source-pkg-1.0 and dest-pkg-1.0 or dest-pkg without version
|
||||||
if i.Version != "" && i.Version == p.Version && p.VersionSuffix == i.VersionSuffix {
|
if i.Version != "" && i.Version == p.Version && p.VersionSuffix == i.VersionSuffix &&
|
||||||
|
p.VersionBuild == i.VersionBuild {
|
||||||
ans = true
|
ans = true
|
||||||
}
|
}
|
||||||
} else if p.Condition == PkgCondAnyRevision {
|
} else if p.Condition == PkgCondAnyRevision {
|
||||||
@@ -270,8 +286,9 @@ func ParsePackageStr(pkg string) (*GentooPackage, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ans := GentooPackage{
|
ans := GentooPackage{
|
||||||
Slot: "0",
|
Slot: "0",
|
||||||
Condition: PkgCondInvalid,
|
Condition: PkgCondInvalid,
|
||||||
|
VersionBuild: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if pkg string contains inline use flags
|
// Check if pkg string contains inline use flags
|
||||||
@@ -315,6 +332,67 @@ func ParsePackageStr(pkg string) (*GentooPackage, error) {
|
|||||||
ans.Condition = PkgCondNot
|
ans.Condition = PkgCondNot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
regexVerString := fmt.Sprintf("[-](%s|%s|%s|%s|%s|%s)((%s|%s|%s|%s|%s|%s|%s)+)*",
|
||||||
|
// Version regex
|
||||||
|
// 1.1
|
||||||
|
"[0-9]+[.][0-9]+[a-z]*",
|
||||||
|
// 1
|
||||||
|
"[0-9]+[a-z]*",
|
||||||
|
// 1.1.1
|
||||||
|
"[0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
||||||
|
// 1.1.1.1
|
||||||
|
"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
||||||
|
// 1.1.1.1.1
|
||||||
|
"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
||||||
|
// 1.1.1.1.1.1
|
||||||
|
"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
||||||
|
// suffix
|
||||||
|
"-r[0-9]+",
|
||||||
|
"_p[0-9]+",
|
||||||
|
"_pre[0-9]*",
|
||||||
|
"_rc[0-9]+",
|
||||||
|
// handle also rc without number
|
||||||
|
"_rc",
|
||||||
|
"_alpha",
|
||||||
|
"_beta",
|
||||||
|
)
|
||||||
|
|
||||||
|
hasBuild, _ := regexp.MatchString(
|
||||||
|
fmt.Sprintf("(%s[/]%s%s([[:]{1,2}[0-9a-zA-Z]*]*)*[+])",
|
||||||
|
RegexCatString, RegexPkgNameString, regexVerString),
|
||||||
|
pkg,
|
||||||
|
)
|
||||||
|
|
||||||
|
if hasBuild {
|
||||||
|
// Check if build number is present
|
||||||
|
buildIdx := strings.LastIndex(pkg, "+")
|
||||||
|
if buildIdx > 0 {
|
||||||
|
// <pre-release> ::= <dot-separated pre-release identifiers>
|
||||||
|
//
|
||||||
|
// <dot-separated pre-release identifiers> ::=
|
||||||
|
// <pre-release identifier> | <pre-release identifier> "."
|
||||||
|
// <dot-separated pre-release identifiers>
|
||||||
|
//
|
||||||
|
// <build> ::= <dot-separated build identifiers>
|
||||||
|
//
|
||||||
|
// <dot-separated build identifiers> ::= <build identifier>
|
||||||
|
// | <build identifier> "." <dot-separated build identifiers>
|
||||||
|
//
|
||||||
|
// <pre-release identifier> ::= <alphanumeric identifier>
|
||||||
|
// | <numeric identifier>
|
||||||
|
//
|
||||||
|
// <build identifier> ::= <alphanumeric identifier>
|
||||||
|
// | <digits>
|
||||||
|
//
|
||||||
|
// <alphanumeric identifier> ::= <non-digit>
|
||||||
|
// | <non-digit> <identifier characters>
|
||||||
|
// | <identifier characters> <non-digit>
|
||||||
|
// | <identifier characters> <non-digit> <identifier characters>
|
||||||
|
ans.VersionBuild = pkg[buildIdx+1:]
|
||||||
|
pkg = pkg[0:buildIdx]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
words := strings.Split(pkg, "/")
|
words := strings.Split(pkg, "/")
|
||||||
if len(words) != 2 {
|
if len(words) != 2 {
|
||||||
return nil, errors.New(fmt.Sprintf("Invalid package string %s", pkg))
|
return nil, errors.New(fmt.Sprintf("Invalid package string %s", pkg))
|
||||||
@@ -337,31 +415,9 @@ func ParsePackageStr(pkg string) (*GentooPackage, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
regexPkg := regexp.MustCompile(
|
regexPkg := regexp.MustCompile(
|
||||||
fmt.Sprintf("[-](%s|%s|%s|%s|%s|%s)((%s|%s|%s|%s|%s|%s|%s)+)*$",
|
fmt.Sprintf("%s$", regexVerString),
|
||||||
// Version regex
|
|
||||||
// 1.1
|
|
||||||
"[0-9]+[.][0-9]+[a-z]*",
|
|
||||||
// 1
|
|
||||||
"[0-9]+[a-z]*",
|
|
||||||
// 1.1.1
|
|
||||||
"[0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
|
||||||
// 1.1.1.1
|
|
||||||
"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
|
||||||
// 1.1.1.1.1
|
|
||||||
"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
|
||||||
// 1.1.1.1.1.1
|
|
||||||
"[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[.][0-9]+[a-z]*",
|
|
||||||
// suffix
|
|
||||||
"-r[0-9]+",
|
|
||||||
"_p[0-9]+",
|
|
||||||
"_pre[0-9]*",
|
|
||||||
"_rc[0-9]+",
|
|
||||||
// handle also rc without number
|
|
||||||
"_rc",
|
|
||||||
"_alpha",
|
|
||||||
"_beta",
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
matches := regexPkg.FindAllString(pkgname, -1)
|
matches := regexPkg.FindAllString(pkgname, -1)
|
||||||
|
|
||||||
// NOTE: Now suffix comples like _alpha_rc1 are not supported.
|
// NOTE: Now suffix comples like _alpha_rc1 are not supported.
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -23,7 +23,7 @@ github.com/Microsoft/hcsshim/internal/longpath
|
|||||||
github.com/Microsoft/hcsshim/internal/safefile
|
github.com/Microsoft/hcsshim/internal/safefile
|
||||||
# github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5
|
# github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5
|
||||||
github.com/Nvveen/Gotty
|
github.com/Nvveen/Gotty
|
||||||
# github.com/Sabayon/pkgs-checker v0.4.2-0.20200101193228-1d500105afb7
|
# github.com/Sabayon/pkgs-checker v0.5.1-0.20200221202320-073693f2c657
|
||||||
github.com/Sabayon/pkgs-checker/pkg/gentoo
|
github.com/Sabayon/pkgs-checker/pkg/gentoo
|
||||||
# github.com/apex/log v1.1.1
|
# github.com/apex/log v1.1.1
|
||||||
github.com/apex/log
|
github.com/apex/log
|
||||||
|
Reference in New Issue
Block a user