diff --git a/cmd/convert.go b/cmd/convert.go index 9e53ca63..a5d9195c 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -28,7 +28,7 @@ import ( ) var convertCmd = &cobra.Command{ - Use: "convert", + Use: "convert [portage-tree] [luet-tree]", Short: "convert other package manager tree into luet", Long: `Parses external PM and produces a luet parsable tree`, PreRun: func(cmd *cobra.Command, args []string) { diff --git a/pkg/tree/builder/gentoo/simpleparser.go b/pkg/tree/builder/gentoo/simpleparser.go index 41625a46..8f295726 100644 --- a/pkg/tree/builder/gentoo/simpleparser.go +++ b/pkg/tree/builder/gentoo/simpleparser.go @@ -353,6 +353,12 @@ func (ep *SimpleEbuildParser) ScanEbuild(path string) (pkg.Packages, error) { return pkg.Packages{}, err } + // Retrieve slot + slot, ok := vars["SLOT"] + if ok && slot.String() != "0" { + pack.SetCategory(fmt.Sprintf("%s-%s", gp.Category, slot.String())) + } + // TODO: Handle this a bit better iuse, ok := vars["IUSE"] if ok { @@ -417,6 +423,7 @@ func (ep *SimpleEbuildParser) ScanEbuild(path string) (pkg.Packages, error) { for _, d := range gRDEPEND.GetDependencies() { //TODO: Resolve to db or create a new one. + //TODO: handle SLOT too. dep := &pkg.DefaultPackage{ Name: d.Dep.Name, Version: d.Dep.Version + d.Dep.VersionSuffix,