This commit is contained in:
morganamilo 2018-03-22 16:39:27 +00:00
parent 7655bd9c62
commit 7fd2a74bd2
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E
6 changed files with 15 additions and 19 deletions

2
cmd.go
View File

@ -146,7 +146,7 @@ func handleCmd() (err error) {
case "T", "deptest":
err = passToPacman(cmdArgs)
case "U", "upgrade":
err =passToPacman(cmdArgs)
err = passToPacman(cmdArgs)
case "G", "getpkgbuild":
err = handleGetpkgbuild()
case "P", "print":

View File

@ -101,7 +101,7 @@ func checkInnerConflict(name string, conflict string, conflicts map[string]strin
return nil
}
if version.Satisfies(dep) {
if version.Satisfies(dep) {
addMapStringSet(conflicts, name, pkg.Name())
return fmt.Errorf("")
}
@ -113,7 +113,7 @@ func checkInnerConflict(name string, conflict string, conflicts map[string]strin
// Checks every to be installed package's conflicts against every other to be
// installed package and its provides.
func checkForInnerConflicts(dc *depCatagories) (map[string]stringSet) {
func checkForInnerConflicts(dc *depCatagories) map[string]stringSet {
conflicts := make(map[string]stringSet)
for _, pkg := range dc.Aur {
@ -151,7 +151,6 @@ func checkReverseConflict(name string, provide string, conflicts map[string]stri
}
}
localDb.PkgCache().ForEach(func(pkg alpm.Package) error {
if name == pkg.Name() {
return nil
@ -175,9 +174,9 @@ func checkReverseConflict(name string, provide string, conflicts map[string]stri
return nil
}
if version == nil || version.Satisfies(dep) {
if version == nil || version.Satisfies(dep) {
// Todo
addMapStringSet(conflicts, name, pkg.Name() + " (" + provide + ")")
addMapStringSet(conflicts, name, pkg.Name()+" ("+provide+")")
return fmt.Errorf("")
}
@ -233,7 +232,7 @@ func checkConflict(name string, conflict string, conflicts map[string]stringSet)
}
if provide.Mod == alpm.DepModAny {
addMapStringSet(conflicts, name, pkg.Name() + " (" + provide.Name + ")")
addMapStringSet(conflicts, name, pkg.Name()+" ("+provide.Name+")")
return fmt.Errorf("")
}
@ -243,7 +242,7 @@ func checkConflict(name string, conflict string, conflicts map[string]stringSet)
}
if version.Satisfies(dep) {
addMapStringSet(conflicts, name, pkg.Name() + " (" + provide.Name + ")")
addMapStringSet(conflicts, name, pkg.Name()+" ("+provide.Name+")")
return fmt.Errorf("")
}
@ -259,7 +258,7 @@ func checkConflict(name string, conflict string, conflicts map[string]stringSet)
// Checks every to be installed package's conflicts against the names and
// provides of every already installed package and checks every to be installed
// package's name and provides against every already installed package.
func checkForConflicts(dc *depCatagories) (map[string]stringSet, error) {
func checkForConflicts(dc *depCatagories) (map[string]stringSet, error) {
conflicts := make(map[string]stringSet)
for _, pkg := range dc.Aur {
@ -302,13 +301,13 @@ func checkForAllConflicts(dc *depCatagories) error {
var wg sync.WaitGroup
wg.Add(2)
fmt.Println(bold(cyan("::")+ " Checking for conflicts..."))
fmt.Println(bold(cyan("::") + " Checking for conflicts..."))
go func() {
conflicts, err = checkForConflicts(dc)
wg.Done()
}()
fmt.Println(bold(cyan("::")+ " Checking for inner conflicts..."))
fmt.Println(bold(cyan("::") + " Checking for inner conflicts..."))
go func() {
innerConflicts = checkForInnerConflicts(dc)
wg.Done()

View File

@ -471,7 +471,7 @@ func depTreeRecursive(dt *depTree, localDb *alpm.Db, syncDb alpm.DbList, isMake
func checkVersions(dt *depTree) error {
depStrings := make([]string, 0)
has := make(map[string][]string)
for _, pkg := range dt.Aur {
for _, deps := range [3][]string{pkg.Depends, pkg.MakeDepends, pkg.CheckDepends} {
for _, dep := range deps {

View File

@ -1,10 +1,10 @@
package main
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"fmt"
"encoding/json"
"strings"
alpm "github.com/jguer/go-alpm"
@ -224,4 +224,3 @@ cleanup:
os.Exit(status)
}

View File

@ -333,7 +333,7 @@ func printUpdateList(parser *arguments) error {
}
for pkg := range parser.targets {
fmt.Println(red(bold("error:")), "package '" + pkg + "' was not found")
fmt.Println(red(bold("error:")), "package '"+pkg+"' was not found")
}
return nil

View File

@ -4,8 +4,8 @@ import (
"bufio"
"fmt"
"os"
"strings"
"sort"
"strings"
"sync"
alpm "github.com/jguer/go-alpm"
@ -90,7 +90,6 @@ func upList(dt *depTree) (aurUp upSlice, repoUp upSlice, err error) {
wg.Done()
}()
if config.Devel {
fmt.Println(bold(cyan("::") + " Checking development packages..."))
wg.Add(1)
@ -100,7 +99,6 @@ func upList(dt *depTree) (aurUp upSlice, repoUp upSlice, err error) {
}()
}
wg.Wait()
errs := make([]string, 0)