mirror of
https://github.com/mudler/luet.git
synced 2025-08-23 01:25:55 +00:00
Update pkgs-checker vendor/
This commit is contained in:
parent
cf9bcf4726
commit
32993bf1f3
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:055364e7afd5d53ddf82407296aa23c52b753e9ed014ce28456f4c16529f62ab"
|
digest = "1:02083a13eba76620ed7548af199aab0e7955ba059997aac578d6341582a3e065"
|
||||||
name = "github.com/Sabayon/pkgs-checker"
|
name = "github.com/Sabayon/pkgs-checker"
|
||||||
packages = ["pkg/gentoo"]
|
packages = ["pkg/gentoo"]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "4fbbdaefc15bf6f16b7950481d8e92e2a19c79f7"
|
revision = "673f8f976791c3acca0af31769cffed3d0ac8c68"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:f7499626626215283473733b7428e3b26457a92cf9dbb1518262fbc4f7523423"
|
digest = "1:f7499626626215283473733b7428e3b26457a92cf9dbb1518262fbc4f7523423"
|
||||||
|
50
Gopkg.toml
Normal file
50
Gopkg.toml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Gopkg.toml example
|
||||||
|
#
|
||||||
|
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
|
||||||
|
# for detailed Gopkg.toml documentation.
|
||||||
|
#
|
||||||
|
# required = ["github.com/user/thing/cmd/thing"]
|
||||||
|
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||||
|
#
|
||||||
|
# [[constraint]]
|
||||||
|
# name = "github.com/user/project"
|
||||||
|
# version = "1.0.0"
|
||||||
|
#
|
||||||
|
# [[constraint]]
|
||||||
|
# name = "github.com/user/project2"
|
||||||
|
# branch = "dev"
|
||||||
|
# source = "github.com/myfork/project2"
|
||||||
|
#
|
||||||
|
# [[override]]
|
||||||
|
# name = "github.com/x/y"
|
||||||
|
# version = "2.4.0"
|
||||||
|
#
|
||||||
|
# [prune]
|
||||||
|
# non-go = false
|
||||||
|
# go-tests = true
|
||||||
|
# unused-packages = true
|
||||||
|
|
||||||
|
|
||||||
|
[[constraint]]
|
||||||
|
name = "github.com/crillab/gophersat"
|
||||||
|
version = "1.1.7"
|
||||||
|
|
||||||
|
[[constraint]]
|
||||||
|
branch = "master"
|
||||||
|
name = "github.com/jinzhu/copier"
|
||||||
|
|
||||||
|
[[constraint]]
|
||||||
|
name = "github.com/onsi/ginkgo"
|
||||||
|
version = "1.8.0"
|
||||||
|
|
||||||
|
[[constraint]]
|
||||||
|
name = "github.com/onsi/gomega"
|
||||||
|
version = "1.5.0"
|
||||||
|
|
||||||
|
[[constraint]]
|
||||||
|
name = "github.com/Sabayon/pkgs-checker"
|
||||||
|
branch = "master"
|
||||||
|
|
||||||
|
[prune]
|
||||||
|
go-tests = true
|
||||||
|
unused-packages = true
|
29
vendor/github.com/Sabayon/pkgs-checker/pkg/gentoo/pkg.go
generated
vendored
29
vendor/github.com/Sabayon/pkgs-checker/pkg/gentoo/pkg.go
generated
vendored
@ -101,6 +101,31 @@ func (p *GentooPackage) GetPackageName() (ans string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *GentooPackage) GetP() string {
|
||||||
|
return fmt.Sprintf("%s-%s", p.Name, p.GetPV())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *GentooPackage) GetPN() string {
|
||||||
|
return p.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *GentooPackage) GetPV() string {
|
||||||
|
return fmt.Sprintf("%s", p.Version)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *GentooPackage) GetPVR() (ans string) {
|
||||||
|
if p.VersionSuffix != "" {
|
||||||
|
ans = fmt.Sprintf("%s%s", p.Version, p.VersionSuffix)
|
||||||
|
} else {
|
||||||
|
ans = p.GetPV()
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *GentooPackage) GetPF() string {
|
||||||
|
return fmt.Sprintf("%s-%s", p.GetPN(), p.GetPVR())
|
||||||
|
}
|
||||||
|
|
||||||
func (p *GentooPackage) Admit(i *GentooPackage) (bool, error) {
|
func (p *GentooPackage) Admit(i *GentooPackage) (bool, error) {
|
||||||
var ans bool = false
|
var ans bool = false
|
||||||
var v1 *version.Version = nil
|
var v1 *version.Version = nil
|
||||||
@ -263,7 +288,7 @@ 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)+)*$",
|
fmt.Sprintf("[-](%s|%s|%s|%s|%s|%s)((%s|%s|%s|%s|%s|%s|%s)+)*$",
|
||||||
// Version regex
|
// Version regex
|
||||||
// 1.1
|
// 1.1
|
||||||
"[0-9]+[.][0-9]+[a-z]*",
|
"[0-9]+[.][0-9]+[a-z]*",
|
||||||
@ -282,6 +307,8 @@ func ParsePackageStr(pkg string) (*GentooPackage, error) {
|
|||||||
"_p[0-9]+",
|
"_p[0-9]+",
|
||||||
"_pre[0-9]*",
|
"_pre[0-9]*",
|
||||||
"_rc[0-9]+",
|
"_rc[0-9]+",
|
||||||
|
// handle also rc without number
|
||||||
|
"_rc",
|
||||||
"_alpha",
|
"_alpha",
|
||||||
"_beta",
|
"_beta",
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user