Support db/name for groups

This commit is contained in:
morganamilo 2018-03-16 01:14:34 +00:00
parent c091460d8c
commit fae0c506cc
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E
3 changed files with 14 additions and 6 deletions

View file

@ -290,7 +290,7 @@ func getDepTree(pkgs []string) (*depTree, error) {
continue
}
_, isGroup := syncDb.PkgCachebyGroup(pkg)
_, isGroup := syncDb.PkgCachebyGroup(name)
if isGroup == nil {
continue
}

View file

@ -104,12 +104,20 @@ func install(parser *arguments) error {
}
for _, pkg := range dc.Repo {
arguments.addTarget(pkg.Name())
arguments.addTarget(pkg.DB().Name() + "/" + pkg.Name())
}
//for _, pkg := range repoTargets {
// arguments.addTarget(pkg)
//}
dbList, err := alpmHandle.SyncDbs()
if err != nil {
return err
}
for _, pkg := range repoTargets {
_, name := splitDbFromName(pkg)
_, errdb := dbList.PkgCachebyGroup(name)
if errdb == nil {
arguments.addTarget(pkg)
}
}
if len(dc.Aur) == 0 && len(arguments.targets) == 0 {
fmt.Println("There is nothing to do")

View file

@ -249,7 +249,7 @@ func packageSlices(toCheck []string) (aur []string, repo []string, err error) {
found := errdb == nil
if !found {
_, errdb = dbList.PkgCachebyGroup(_pkg)
_, errdb = dbList.PkgCachebyGroup(name)
found = errdb == nil
}