mirror of
https://github.com/mudler/luet.git
synced 2025-08-10 11:42:15 +00:00
convert: Now use slot for category name
This commit is contained in:
parent
07dff7f197
commit
c0cc9ec703
@ -28,7 +28,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var convertCmd = &cobra.Command{
|
var convertCmd = &cobra.Command{
|
||||||
Use: "convert",
|
Use: "convert [portage-tree] [luet-tree]",
|
||||||
Short: "convert other package manager tree into luet",
|
Short: "convert other package manager tree into luet",
|
||||||
Long: `Parses external PM and produces a luet parsable tree`,
|
Long: `Parses external PM and produces a luet parsable tree`,
|
||||||
PreRun: func(cmd *cobra.Command, args []string) {
|
PreRun: func(cmd *cobra.Command, args []string) {
|
||||||
|
@ -353,6 +353,12 @@ func (ep *SimpleEbuildParser) ScanEbuild(path string) (pkg.Packages, error) {
|
|||||||
return pkg.Packages{}, err
|
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
|
// TODO: Handle this a bit better
|
||||||
iuse, ok := vars["IUSE"]
|
iuse, ok := vars["IUSE"]
|
||||||
if ok {
|
if ok {
|
||||||
@ -417,6 +423,7 @@ func (ep *SimpleEbuildParser) ScanEbuild(path string) (pkg.Packages, error) {
|
|||||||
for _, d := range gRDEPEND.GetDependencies() {
|
for _, d := range gRDEPEND.GetDependencies() {
|
||||||
|
|
||||||
//TODO: Resolve to db or create a new one.
|
//TODO: Resolve to db or create a new one.
|
||||||
|
//TODO: handle SLOT too.
|
||||||
dep := &pkg.DefaultPackage{
|
dep := &pkg.DefaultPackage{
|
||||||
Name: d.Dep.Name,
|
Name: d.Dep.Name,
|
||||||
Version: d.Dep.Version + d.Dep.VersionSuffix,
|
Version: d.Dep.Version + d.Dep.VersionSuffix,
|
||||||
|
Loading…
Reference in New Issue
Block a user