Commit Graph

74 Commits

Author SHA1 Message Date
jguer
42f337f2a5
fix(pgp): package key importing 2020-07-11 00:48:30 +02:00
jguer
7ed2cf7b49
fix(download): fixes #1322 2020-07-10 03:02:34 +02:00
jguer
054a9ac613
refactor(dep): package dep 2020-07-10 02:36:45 +02:00
jguer
e47c9584c1
fix(format): gofumt files 2020-07-08 03:40:50 +02:00
jguer
7a32ffdd37
fix(cmdArgs): deglobal cmd args 2020-07-08 03:22:01 +02:00
jguer
36730a41e3
fix(config): package alpmHandle into runtimeSettings 2020-07-05 16:58:35 +02:00
jguer
488d9537db
fix(download): fixes #1228 and -Gf 2020-07-05 14:06:31 +02:00
jguer
fb5b6b74fe
fix(parser): package parser 2020-07-05 09:36:27 +02:00
jguer
d003e96e07
fix(ci): fix env propagation
fix broken ci artifact download
2020-06-13 19:49:57 +02:00
jguer
732f1a5412
feat(localization): wrap all translatable strings 2020-05-05 19:21:42 +02:00
jguer
9fccdcb30f
fix(ci): implement stricter linting settings 2020-05-02 16:17:20 +02:00
Jguer
990be97d44
fix #1135: pull and fast forward abs instead of just fetching latest head 2019-12-23 20:59:37 +00: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
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
dacd77012c
Move multierror 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
J Guerreiro
73d87b01b0
Merge pull request #1062 from reyreaud-l/add-diff-review-ref
Change ref name used in git to compute diff to "AUR_SEEN".
2019-10-15 23:55:36 +01:00
Loic Reyreaud
21d0f33dae
Change ref name used for marking reviewed diff to AUR_SEEN 2019-10-15 10:02:10 +02:00
Loic Reyreaud
de48604633
change ref used in git to compute diff to AURUTILS_SEEN
Introduce a global constant in download.go to avoid re-typing the string
everytime.
Change the string form YAY_DIFF_SEEN to AURUTILS_SEEN.
2019-10-14 11:07:21 +02:00
Jguer
a591b33262
Add errguards throughout the code to enable golangci-lint 2019-10-13 20:56:27 +01:00
Loic Reyreaud
7ee206f36e
Implement proper diff display
As raised in #994, diff display was not proper when interrupting during
download or diff review.

This commit introduce:
- Add a ref in the git tree named "YAY_DIFF_REVIEW" which is set to the last
diff reviewed by the user.
- Change the function displaying diff to user to make proper use of this
new ref. If the ref does not exist in the git tree, it will display the
diff from origin to HEAD@{upstream}.
- Add a function updating the YAY_DIFF_REVIEW after it has been reviewed
by user. It uses the `toDiff` list in the `install` function.
- Add utils function related to handling this change in download.go.

This change only consider diff reviewed to update the YAY_DIFF_REVIEW ref.
If a user does not enable review, the ref will not be updated and the
user will be prompted for review when he enables diff review.

Signed-off-by: Loic Reyreaud <reyreaud.loic@gmail.com>
2019-10-07 13:59:17 +02:00
Jguer
9e205eef4b
Move MultiError to types package 2019-10-05 17:35:46 +01:00
Maryse47
f8339fc568
Use BuildDir instead of cacheHome to store PKGBUILDS with -G
BuildDir resolves to same place as cacheHome by default but it's configurable which helps in case user want to chose different directory to store PKGBUILDS.
2019-09-29 15:42:34 +00:00
Jguer
d34a84204a Changes -G in ABS to use git and symlink result.
Fixes #1027
2019-09-20 18:34:05 +01:00
Christian Muehlhaeuser
3700c1daa6
Avoid unnecessary conversion
stderr is already a string.
2019-07-19 11:51:42 +02:00
morganamilo
6415c23be2
Random fixups 2019-04-23 17:03:09 +01:00
morganamilo
112046853b
Use correct case on go-alpm import 2019-04-23 16:53:20 +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
Motkov.Kirill
504e4e21af remove unwanted space 2019-02-26 14:41:35 +03:00
morganamilo
895788e01b
Update go-alpm 2019-02-14 20:45:18 +00:00
morganamilo
5ce4a49687
Update go-alpm 2019-02-04 16:56:02 +00:00
cezarmathe
6a95783790
Fixed a comment in download.go, line 18 2018-11-30 11:41:30 +02:00
Joe Groocock
52bf777e67
Print errors on stderr
This makes a start on fixing https://github.com/Jguer/yay/issues/715
It is by no means a complete solution, but instead a start
2018-11-20 22:27:30 +00:00
morganamilo
1beeaaf299
Limit download concurrency to 25 threads 2018-09-04 20:03:23 +01:00
morganamilo
004595a396
Dont rm directories with -G unless using -f 2018-08-30 15:30:52 +01:00
morganamilo
c93b3fca9e
Fix tests 2018-08-29 21:15:01 +01:00
morganamilo
e547173d42
Use goroutines for fetching abs packages 2018-08-18 17:14:07 +01:00
morganamilo
a1edd09a52
Fixup getPkgbuildsFromABS
Make it output more similary to downloadPkgbuilds. Refactor to remove
all the indention.
2018-08-18 17:12:42 +01:00
morganamilo
cba56c3f9e
Use downloadPkgbuilds for -G 2018-08-18 17:12:42 +01:00
morganamilo
297bf31cdf
Set GIT_TERMINAL_PROMPT=0 for clone and fetch 2018-08-09 16:25:14 +01:00
morganamilo
8c2adaddb3
Hide git output 2018-08-09 16:25:14 +01:00
morganamilo
2a60dd7052
Remove unneeded variables 2018-07-30 14:14:16 +01:00
morganamilo
a61eb0d568
Use no-progress when cloning packages
The output is annoying and takes up many lines. All AUR packages clone
extremley fast anyway, making the progress unneeded.
2018-07-28 16:15:01 +01:00
morganamilo
473a2de225
Refactor pssToFoo() functions
Previously each call to an external command had two functions.
PassToFoo() and PassToFooCapture(). These functions are always similar
and end up with duplicated code.

So instead have the passToFoo() functions return the cmd itself and
create small helper functions show() and capture() which will run the
command and either forward it to std{out,err,in} or capture the output

Also the saveVCSInfo() function which was called after every makepkg
call is now only called after the pacman -U succeeds.
2018-07-19 18:37:28 +01:00
morganamilo
00da26a3ce
Always show diffs for newly cloned packages
Newly cloned packages already start out at origin/master, so there is no
diff to show. Track if we cloned a package and if so make sure to show
the full diff
2018-06-10 03:41:25 +01:00
morganamilo
4f8b43cd60
Show diffs before merging
This is what 5775e3..43d2a6 has been leading up to. Git fetch will be
called on all pkgbuilds, then the user is offered a chance to view the
diffs. If they choose to continue, merging happens. This allows users to
abort the install after viewing diffs and still be able to see thoes
diffs again if they try to install later on.

This also makes the git stuff a little more modular which should help in
organzing diff showing + pkgbuild editing.
2018-06-10 03:21:08 +01:00
morganamilo
5775e3c0b7
Split git clone/pull and merge function 2018-06-10 03:17:23 +01:00
morganamilo
c4d319268c
Disable git terminal prompt
This allows requests that want authentication to fail instantly and
silently. Rather than delying the program and printing to the terminal.
2018-06-02 13:52:18 +01:00
Anna
5b6c4101f8
Merge pull request #447 from Morganamilo/fix#131
Implement diffs for pkgbuild viewing.
2018-06-01 19:11:52 +01:00