Commit Graph

10 Commits

Author SHA1 Message Date
morganamilo
b2f636d93b
Use go-pacmanconf for config parsing
This moves the config parsing from out of alpm and into the
go-pacmanconf libary plus some boilerplate code to get it into our alpm
config.

This makes sense as many config options such as UseColor and CleanMethod
have nothing to do with alpm and only relate to pacman.

pacman-conf is used instead of direct config parsing. This tool resolves
defaults and includes for us, so we don't need to handle it.

It is now safe to drop all the config parsing from go-alpm.
2018-09-10 23:07:34 +01:00
morganamilo
8711562923
capture: strip whitespace on outputs 2018-08-18 17:14:03 +01:00
morganamilo
8cb800c6d1
Dont change std{out,err,in} in passToGit
This should be done in show instead
2018-08-09 19:44:56 +01:00
morganamilo
5ce740068e
Always pass PacmanConf to pacman
Normaly we only pass --config to pacman if the user specifies it on the
command line. Otherwise we let pacman use it's default config location.

If the user has changed pacmanconf in Yay's config file then this could
cause a miss match between the config we use to init alpm and the config
pacman is using.
2018-07-28 19:54:41 +01:00
Anna
96532c0b27
Merge pull request #562 from Morganamilo/#560
Add --makepkgconf
2018-07-24 13:08:21 +01:00
morganamilo
4af671afac
Add --[no]makepkgconf 2018-07-24 13:07:17 +01:00
morganamilo
253d162b5b
Remove unused code, fix typo for -g flag
As it turns out, the times you need root also tend to be the time you
need to manipulate the database. So the needWait() function can be
removed and repllaced by needRoot()
2018-07-21 17:40:32 +01:00
J Guerreiro
f9972da763
Wait for db.lck to become available before starting a db operation (#573)
* Wait for db.lck to become available before starting a db operation

* Fix err!=nil issues and avoid spamming users

* Remove redundant cases

* Remove return
2018-07-21 16:18:19 +01:00
morganamilo
257653047b
Move sudoloop code to exec.go 2018-07-19 18:58:04 +01:00
morganamilo
8427dc3804
Move passToFoo() functions to their own file 2018-07-19 18:48:46 +01:00