Comit 2d6fe95903 renamed the Yay specific
flag -P/--print to -P/--show. The rename caused --print to stop being
accepted as it was no longer in the list of accepted args.
isArg() was generated from pacman's manpage using a script. All dashes
were stripped out. Some flags used '-' as a seperator and were stripped
out by mistake.
This makes more sense and falls in line with the structs value which has
always been cleanafter. afterclean is still useable for compatibility
but is undocumented.
Split functions out into smaller, more simple chunks. Ensure the correct
order of things.
Before, initConfig() would also create config.BuildDirbefore
the command line flags have been applied, so yay would
try to mkdir what was in the config, ignoring the flag.
This is simply implemented by looking up against all the args. No
conflicts are checked such as using -Ss and -Si at the same time or using
-u with -D.
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.
Currently we do not handle -Sp, this leads to yay trying a proper
install and failing. So instead pass it to pacman and exit. Ideally we
would extend -Sp to include AUR packages but for now don't bother.
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()
* 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
The order of targets does somewhat matter. For example doing something
like 'pacman -S db1/foo db2/foo' should cause the second package to be
skipped.
The order of targets also effects in which order they are resolved. This
should make errors more reproducable if any ever occur.
This is a rewrite of the dependency system, It aims to be cleaner
written, with a better idea of what is needed from the start, meaning
less new code being hacked on for things that were not thought about.
This version also aims to use as many small functions as possible, for
cleaner code and better testing.
Added dep.go:
general dependency functions
Added depPool.go:
Replacement of depTree, dependencies were never ordered so
a tree did not really make sense. Instead the term pool
makes more sense.
Added depOrder.go:
Replacement of depCatagories, This simply orders the
dependencies, dependencies are still catagorized as repo and AUR
but I believe this to be a better name
Added depCheck.go:
Replaces conflicts.go and also contains the missing dependency
code
This version is mostly the same as the old version with a few
improvments:
Missing packages will print the full dependency tree
Versioned dependency checking errors should be fixed
Make depends should be calculated properly
Experimental AUR provide searcher
This code has been added along side the old code for testing and is not
currently used by the install process. Once the install process is moved
to use this code, the old code will be removed.
Print the full descriptions of each news item.
The description is formatted as html, basic parsing is done to display
it properly. -q/--quiet can be used to diplay title only.
99% of the time if a user wants to pas an argument twice they would do
`-cc` or `--clean --clean`. Still doing `-c --clean` is still a valid
thing to do. This commits allows getArg() to this properly.