Merge pull request #250 from Morganamilo/fg

Support db/name for groups
This commit is contained in:
Morgana authored and GitHub committed 2018-03-16 01:15:32 +00:00
commit 989096a46c
3 files changed
+14 -6

No files matched your search

+1 -1
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
}
+12 -4
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")
+1 -1
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
}