refactor(yay): move cfg inside of runtime (#2259)
* rework relationship between runtime and cfg * separate runtime from cfg * simplify instantiation logic * move installer to appropriate package * move operator to sync package * add tests for srcinfo service * consolidate srcinfo service in sync * add logger to srcinfo * add logger to preparer * remove unused text functions * remove remaining text.* from srcinfo * remove global logger parts * remove global org method exports * remove global logger * move text->input * add rule to prevent fmt.Print * update golangci go version * remove outdated FAQs * remove outdated FAQs
This commit is contained in:
74 files changed
+1475
-1367
No files matched your search
@@ -7,56 +7,3 @@ import (
|
||||
)
|
||||
|
||||
var ErrPackagesNotFound = errors.New(gotext.Get("could not find all required packages"))
|
||||
|
||||
type NoPkgDestsFoundError struct {
|
||||
dir string
|
||||
}
|
||||
|
||||
func (e *NoPkgDestsFoundError) Error() string {
|
||||
return gotext.Get("could not find any package archives listed in %s", e.dir)
|
||||
}
|
||||
|
||||
type SetPkgReasonError struct {
|
||||
exp bool // explicit
|
||||
}
|
||||
|
||||
func (e *SetPkgReasonError) Error() string {
|
||||
reason := gotext.Get("explicit")
|
||||
if !e.exp {
|
||||
reason = gotext.Get("dependency")
|
||||
}
|
||||
|
||||
return gotext.Get("error updating package install reason to %s", reason)
|
||||
}
|
||||
|
||||
type FindPkgDestError struct {
|
||||
name, pkgDest string
|
||||
}
|
||||
|
||||
func (e *FindPkgDestError) Error() string {
|
||||
return gotext.Get(
|
||||
"the PKGDEST for %s is listed by makepkg but does not exist: %s",
|
||||
e.name, e.pkgDest)
|
||||
}
|
||||
|
||||
type PkgDestNotInListError struct {
|
||||
name string
|
||||
}
|
||||
|
||||
func (e *PkgDestNotInListError) Error() string {
|
||||
return gotext.Get("could not find PKGDEST for: %s", e.name)
|
||||
}
|
||||
|
||||
type FailedIgnoredPkgError struct {
|
||||
pkgErrors map[string]error
|
||||
}
|
||||
|
||||
func (e *FailedIgnoredPkgError) Error() string {
|
||||
msg := gotext.Get("Failed to install the following packages. Manual intervention is required:")
|
||||
|
||||
for pkg, err := range e.pkgErrors {
|
||||
msg += "\n" + pkg + " - " + err.Error()
|
||||
}
|
||||
|
||||
return msg
|
||||
}
|
||||
Reference in new issue
Block a user