Commit Graph

95 Commits

Author SHA1 Message Date
jguer
9fccdcb30f
fix(ci): implement stricter linting settings 2020-05-02 16:17:20 +02:00
morganamilo
f2959922a7
Remove tar support
tar is slower and harder to diff. I doubt any one still uses it intentially.

There's a chance some people have not cleared their cache in two years
and still have tar based packages around. But forcing them to clear
their cache is not a big deal at all.
2019-11-11 02:57:14 +00:00
Pierre-Alain TORET
6dd65a2df2
Add SudoBin and SudoFlags 2019-10-28 18:35:36 +00:00
Jguer
290d3d2c43
Patches -G to copy directory instead of linking. --absdir is recognized as a flag 2019-10-23 12:31:29 +01:00
Anna
169d0a07fc
Merge pull request #1068 from Morganamilo/abs
Move abs cloning to it's own directory
2019-10-21 12:34:35 +01:00
morganamilo
bbeef9d237
Move abs cloning to it's down directory
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.
2019-10-18 08:48:58 +01:00
morganamilo
cff358d5d6
Move intrange to its own module
types is pretty generic as a module name, this should be split into
seperate modules.
2019-10-16 23:18:04 +01:00
morganamilo
f2579f26a3
Move stringset to its own module
types is pretty generic as a module name, this should be split into
seperate modules.
2019-10-16 23:18:04 +01:00
morganamilo
4d91acc749
Re-add --batchinstall and fix dep issues 2019-10-16 20:59:52 +01:00
J Guerreiro
7b710b796b
Merge pull request #1056 from Morganamilo/searchby
Add --searchby
2019-10-13 23:38:28 +01:00
Jguer
a591b33262
Add errguards throughout the code to enable golangci-lint 2019-10-13 20:56:27 +01:00
morganamilo
ab2101ab49
Add --searchby
Allow using the RPC's &by= field during -Ss
2019-10-10 17:43:22 +01:00
Jguer
bf89b3383c
Move IntRange definition to types package 2019-10-05 19:23:13 +01:00
Jguer
b01790f752
Moved StringSet definition to types package 2019-10-05 18:39:31 +01:00
Jguer
2214bc0cb2
Revert "Merge pull request #778 from Morganamilo/group-transactions"
This reverts commit 6cd47dd83c, reversing
changes made to 16fddae8b6.

Signed-off-by: Jguer <me@jguer.space>
2019-10-04 19:42:17 +01:00
morganamilo
80e66ce479
Allow many aur packages to be installed at once.
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.
2019-06-17 14:25:59 +01:00
morganamilo
5ac36ad97e
Ensure global pacman arguments are always used 2019-06-17 13:03:57 +01:00
Harry Arakkal
48e1d65539 Updated sudo check for -Rp 2019-05-17 21:26:22 -07:00
J Guerreiro
888a289a1b
Revert "Add SudoBin" 2019-03-29 22:09:27 +00:00
Pierre-Alain TORET
877c794bc2 Add SudoBin and SudoFlags 2019-03-27 15:16:39 +01:00
Motkov Kirill
14ac756298 Code improvements
- Removed yoda condition.
- Renamed/removed variables which shadows built-in names.
- Rewrited if-else-if-else chains to switch statements.
2019-03-10 16:36:01 +03:00
Jguer
2ed7df4f5a
Unexport consts. Make default a literal
Signed-off-by: Jguer <me@jguer.space>
2018-10-22 21:00:16 +01:00
morganamilo
8c44da374c
Add ask to accepted flags
Again, the list was generated via the manpage and as this is
undocumented it was forgotten.
2018-10-13 01:31:16 +01:00
morganamilo
0f4768b4fe
Allow --print again
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.
2018-10-09 16:15:46 +01:00
morganamilo
73deae94cf
Fix missing '-' in flags
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.
2018-10-09 16:06:14 +01:00
Anna
6ee14d44b8
Merge pull request #738 from Morganamilo/fix#736
Rework cleanafter
2018-10-04 09:18:57 +01:00
Tom Swartz
ae7400890d Fix Typos 2018-10-02 16:30:18 -04:00
morganamilo
4cc57dd970
Rename afterclean to cleanafter
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.
2018-09-27 16:12:43 +01:00
morganamilo
60cf21f445
Accept --assume-installed 2018-09-23 22:10:22 +01:00
morganamilo
004595a396
Dont rm directories with -G unless using -f 2018-08-30 15:30:52 +01:00
morganamilo
2f545c7fdc
Correctly set config.AURURL after parsing flags
And also honour aururl during -Pc
2018-08-19 05:53:32 +01:00
morganamilo
0454e8918b
Add --aururl 2018-08-19 05:10:24 +01:00
morganamilo
febccaef3a
Reorder main
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.
2018-08-12 05:09:53 +01:00
morganamilo
16d4a2ca88
Support = on long opts, not short opts 2018-08-08 16:21:33 +01:00
morganamilo
6b35f9ee2f
Revert "Support -r=foo syntax"
This reverts commit 97006ade19. But keepts
the usr of k+1 and len(arg)-1
2018-08-08 16:20:38 +01:00
morganamilo
2d6fe95903
Add yay specific args, drop conflicting args
Replace -P/--print with -P/--show
Replace --config with --currentconfig
2018-08-05 15:22:04 +01:00
morganamilo
db9ff186d6
Accept - and -- options 2018-08-02 16:51:33 +01:00
morganamilo
97006ade19
Support -r=foo syntax 2018-08-02 14:50:56 +01:00
morganamilo
4e67c1e886
Simlify huge case statments
Instead of having true in every case, rely on the lack of fallthrough
causing the default not to trigger.

Moved handleConfig to parser.go
2018-08-02 14:50:56 +01:00
morganamilo
d9823e4230
Error on unkown args
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.
2018-08-02 14:50:51 +01:00
morganamilo
b4c102a17a
Split stdin on new line
Pacman 5.1 changed the stdin seperation from whitespace to newline. To
maintain corectness we should also do this.
2018-07-30 01:16:36 +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
74f4a44da6
Merge pull request #584 from Morganamilo/completion-slow
Rework completion
2018-07-26 13:56:06 +01:00
morganamilo
bc6028348b
Make the completion refresh time configurable
The default setting is 7 days. The user can specify a different time in
days. -1 can be set to never refresh while 0 can be used to always
refresh.
2018-07-26 13:54:13 +01:00
morganamilo
c4fec3dad0
Wrap -Sp
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.
2018-07-25 11:16:30 +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
562a21fb4d
Support --aur/--repo with -Sc 2018-07-24 02:49:45 +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