Fix build of pkgstr

This commit is contained in:
Geaaru
2019-11-04 00:36:46 +01:00
committed by Daniele Rondina
parent d609608fd1
commit d6d90edd67

View File

@@ -180,12 +180,12 @@ func (ep *SimpleEbuildParser) ScanEbuild(path string, tree pkg.Tree) ([]pkg.Pack
Debug("Starting parsing of ebuild", path)
pkgstr := filepath.Base(path)
pkgstr = filepath.Base(filepath.Dir(path)) + "/" + strings.Replace(pkgstr, ".ebuild", "", -1)
paths := strings.Split(filepath.Dir(path), "/")
pkgstr = paths[len(paths)-2] + "/" + strings.Replace(pkgstr, ".ebuild", "", -1)
gp, err := _gentoo.ParsePackageStr(pkgstr)
if err != nil {
return []pkg.Package{}, errors.New("Error on parsing package string")
}
pack := &pkg.DefaultPackage{