Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into jguer/local-pkgbuild-…
Browse files Browse the repository at this point in the history
…install
  • Loading branch information
Jguer committed Aug 23, 2022
2 parents b054828 + 714fee0 commit cce21ce
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions doc/yay.8
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,6 @@ builds.
.B \-\-nosudoloop
Do not loop sudo calls in the background.

.SH WEB OPTIONS (APPLY TO \-W AND \-\-WEB)

.SH EXAMPLES
.TP
yay \fIfoo\fR
Expand Down
6 changes: 3 additions & 3 deletions pkg/dep/depPool.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ type Pool struct {
Groups []string
AlpmExecutor db.Executor
Warnings *query.AURWarnings
aurClient *aur.Client
aurClient aur.ClientInterface
}

func newPool(dbExecutor db.Executor, aurClient *aur.Client) *Pool {
func newPool(dbExecutor db.Executor, aurClient aur.ClientInterface) *Pool {
dp := &Pool{
Targets: []Target{},
Explicit: map[string]struct{}{},
Expand Down Expand Up @@ -389,7 +389,7 @@ func (dp *Pool) ResolveRepoDependency(pkg db.IPackage, noDeps bool) {
func GetPool(ctx context.Context, pkgs []string,
warnings *query.AURWarnings,
dbExecutor db.Executor,
aurClient *aur.Client,
aurClient aur.ClientInterface,
mode parser.TargetMode,
ignoreProviders, noConfirm, provides bool,
rebuild string, splitN int, noDeps bool, noCheckDeps bool, assumeInstalled []string,
Expand Down
2 changes: 1 addition & 1 deletion pkg/query/aur_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func AURInfo(ctx context.Context, aurClient aur.ClientInterface, names []string,
return info, nil
}

func AURInfoPrint(ctx context.Context, aurClient *aur.Client, names []string, splitN int) ([]*Pkg, error) {
func AURInfoPrint(ctx context.Context, aurClient aur.ClientInterface, names []string, splitN int) ([]*Pkg, error) {
text.OperationInfoln(gotext.Get("Querying AUR..."))

warnings := &AURWarnings{}
Expand Down
4 changes: 2 additions & 2 deletions pkg/query/mixed_sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const sourceAUR = "aur"

type Builder interface {
Len() int
Execute(ctx context.Context, dbExecutor db.Executor, aurClient *aur.Client, pkgS []string)
Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string)
Results(w io.Writer, dbExecutor db.Executor, verboseSearch SearchVerbosity) error
GetTargets(include, exclude intrange.IntRanges, otherExclude stringset.StringSet) ([]string, error)
}
Expand Down Expand Up @@ -122,7 +122,7 @@ func (a *abstractResults) Less(i, j int) bool {
return simA > simB
}

func (s *MixedSourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient *aur.Client, pkgS []string) {
func (s *MixedSourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string) {
var aurErr error

pkgS = RemoveInvalidTargets(pkgS, s.targetMode)
Expand Down
4 changes: 2 additions & 2 deletions pkg/query/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewSourceQueryBuilder(
}
}

func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient *aur.Client, pkgS []string) {
func (s *SourceQueryBuilder) Execute(ctx context.Context, dbExecutor db.Executor, aurClient aur.ClientInterface, pkgS []string) {
var aurErr error

pkgS = RemoveInvalidTargets(pkgS, s.targetMode)
Expand Down Expand Up @@ -176,7 +176,7 @@ func filterAURResults(pkgS []string, results []aur.Pkg) []aur.Pkg {
}

// queryAUR searches AUR and narrows based on subarguments.
func queryAUR(ctx context.Context, aurClient *aur.Client, pkgS []string, searchBy string) ([]aur.Pkg, error) {
func queryAUR(ctx context.Context, aurClient aur.ClientInterface, pkgS []string, searchBy string) ([]aur.Pkg, error) {
var (
err error
by = getSearchBy(searchBy)
Expand Down
2 changes: 1 addition & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

// SyncSearch presents a query to the local repos and to the AUR.
func syncSearch(ctx context.Context, pkgS []string, aurClient *aur.Client,
func syncSearch(ctx context.Context, pkgS []string, aurClient aur.ClientInterface,
dbExecutor db.Executor, queryBuilder query.Builder, verbose bool,
) error {
queryBuilder.Execute(ctx, dbExecutor, aurClient, pkgS)
Expand Down
2 changes: 1 addition & 1 deletion vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (e *ErrAURVote) Error() string {
}

func handlePackageVote(ctx context.Context,
targets []string, aurClient *aur.Client,
targets []string, aurClient aur.ClientInterface,
voteClient *vote.Client, splitN int, upvote bool,
) error {
infos, err := query.AURInfoPrint(ctx, aurClient, targets, splitN)
Expand Down

0 comments on commit cce21ce

Please sign in to comment.