Merge pull request #249 from Morganamilo/fix#245

Use a question callback for ignorepkg
This commit is contained in:
Morgana authored and GitHub committed 2018-03-16 01:04:41 +00:00
commit b4ba01c928
3 files changed
+15 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
package main
import (
alpm "github.com/jguer/go-alpm"
)
func QuestionCallback(question alpm.QuestionAny) {
q, err := question.QuestionInstallIgnorepkg()
if err == nil {
q.SetInstall(true)
}
}
+2
View File
@@ -223,6 +223,8 @@ func initAlpm() (err error) {
return
}
alpmHandle.SetQuestionCallback(QuestionCallback)
return
}
+1 -1
View File
@@ -184,7 +184,7 @@ func install(parser *arguments) error {
//conflicts have been checked so answer y for them
ask, _ := strconv.Atoi(cmdArgs.globals["ask"])
uask := alpm.Question(ask) | alpm.QuestionConflictPkg
uask := alpm.QuestionType(ask) | alpm.QuestionTypeConflictPkg
cmdArgs.globals["ask"] = fmt.Sprint(uask)
//this downloads the package build sources but also causes