As mentioned it is possible for stuff to clash in cache if you were to
-G a package from the repos, then -S an AUR package by the same name. To
avoid that give abs cloning its own directory.
It is still possible for a clash to occur if there was a package named
abs. However currently there is not.
Idealy the aur cloning would also get it's own subdir, but that will
invalidate everyone's cache so leaving it for a time with more breaking
changes.
This is also under its own config option so that AURDEST does not
interfere with it.
After building an AUR package don't install it right away. Instead queue
it for install.
Then when a package comes along that does not have all of its
dependencies satisfied, install the queued packages before builting.
This allows a standard AUR update to be done with one transaction, while
building AUR packages with long dependency chains will work as normal.
This feature is behind the `--batchinstall` flag.
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.