Merge pull request #249 from Morganamilo/fix#245
Use a question callback for ignorepkg
This commit is contained in:
3 files changed
+15
-1
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -223,6 +223,8 @@ func initAlpm() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
alpmHandle.SetQuestionCallback(QuestionCallback)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user