Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--devel produces a bunch of odd warnings #1405

Closed
rien333 opened this issue Oct 29, 2020 · 21 comments
Closed

--devel produces a bunch of odd warnings #1405

rien333 opened this issue Oct 29, 2020 · 21 comments

Comments

@rien333
Copy link

rien333 commented Oct 29, 2020

Affected Version

I've tried running yay-git, as well as the latest stable version (10.1.0-1)

$ yay -V
yay v10.1.0.r3.g7d080df - libalpm v12.0.2

Describe the bug
Whenever I run yay -Sy --devel, yay outputs a bunch -> signal: killed" messages, that seemingly do nothing, but I'm also really not sure where they're coming from (see output below). Sometimes the list of messages is prefixed with -> exit status 128. After these messages, I'm presented with the dialogue to upgrade -git packages, and everything works as expected.

To Reproduce
Not sure, this suddenly started to happen a week or two ago. It happens everytime I run yay -Sy --devel.

Expected behavior
yay doesn't output a bunch of seemingly meaningless/uninformative warnings/messages.

Output

$ yay -Syu --devel
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 custom is up to date
:: Starting full system upgrade...
 there is nothing to do
:: Searching databases for updates...
:: Searching AUR for updates...
:: Checking development packages...
 -> spotify: ignoring package upgrade (1.0.98.78-2 => 1:1.1.42.622-2)
 -> exit status 128
 -> signal: killed
 -> signal: killed
 -> signal: killed
 -> signal: killed [x25]
 -> Flagged Out Of Date AUR Packages: ...
:: 5 Packages to upgrade.
...
# yay continues as normal

Let me know what other sort of info might be relevant.

@rien333
Copy link
Author

rien333 commented Nov 1, 2020

I've also seen it happen that yay only outputs -> exit status 128 before the package selection dialogue thingy, instead of that message plus a bunch of -> signal: killed messages.

@agorgl
Copy link

agorgl commented Nov 12, 2020

Same here

@IslandC0der
Copy link

Can also confirm on yay v10.1.1

@kureta
Copy link

kureta commented Dec 1, 2020

My internet connection dropped and update was interrupted before this message. Maybe that is related.

@rien333
Copy link
Author

rien333 commented Dec 1, 2020

My internet connection dropped and update was interrupted before this message. Maybe that is related.

My internet is sometimes unstable, but this happens so consistently that I expect this to be unrelated to internet connectivity (I've never seen it not happen, iirc also on more stable networks).

@Jguer
Copy link
Owner

Jguer commented Dec 1, 2020

@rien333 can you share your gitconfig (blur out ids and signing keys if you prefer) but this error is generally connected to the command timing out (signal killed) or git unclean exit (128 due to auth issues or bad permissions from what I've seen, can happen if you have a command that turns all https to ssh on gitconfig)

EDIT: before yay would always hide this git output but for debugging purposes it is now visible

@rien333
Copy link
Author

rien333 commented Dec 2, 2020

My ~/.gitconfig is not remarkable in any way:

  [user]
      email = ***@gmail.com
      name = rien333
  [color]
      ui = auto

@Qyriad
Copy link

Qyriad commented Dec 9, 2020

Entirely removing the yay build directory got rid of these warnings for me, as a workaround, though obviously that's not ideal.

@DrasLorus
Copy link

Encountering the sames issue I have tested to remove the yay cache directory (rm -rf ~/.cache/yay/*) and it indeed removed the warnings. Maybe by comparing this directory with a clean one (generated using yay --gendb after being removed) may help find the source of the problem?

@smac89
Copy link

smac89 commented Dec 19, 2020

So far all I can find is that the error is from git, because the error message exactly corresponds to what is found here: gogs/gogs#3294.

It also makes sense because this happens when yay is checking devel packages.


EDIT

So I decided to drop a fake git into the path and turns out that one of my packages required authentication for git 😕

This is the command yay was running:

git ls-remote https://git.mirko.pm/brombinmirko/xfce4-taskbar-plugin HEAD

Fortunately I don't use it anymore, so I just uninstalled it, and now the warning is gone

@stale
Copy link

stale bot commented Feb 17, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 17, 2021
@rien333
Copy link
Author

rien333 commented Feb 17, 2021

This issue has been marked as unstale because it's still very much real. Thanks for your work stale bot.

@stale stale bot removed the stale label Feb 17, 2021
@rien333
Copy link
Author

rien333 commented Feb 17, 2021

so quick, good job

@ljrk0
Copy link

ljrk0 commented Apr 17, 2021

So far all I can find is that the error is from git, because the error message exactly corresponds to what is found here: gogs/gogs#3294.

It also makes sense because this happens when yay is checking devel packages.

EDIT

So I decided to drop a fake git into the path and turns out that one of my packages required authentication for git confused

This is the command yay was running:

git ls-remote https://git.mirko.pm/brombinmirko/xfce4-taskbar-plugin HEAD

Fortunately I don't use it anymore, so I just uninstalled it, and now the warning is gone

Yep, this happens if login is needed, for me it was wdisplays-git.

EDIT: To track this you can run watch -n 0.1 'ps aux | grep git' >> log while updating, or the like.

ljrk0 added a commit to ljrk0/yay that referenced this issue Apr 17, 2021
Instead of using BuildGitCmd and parsing the output, we can use the Go
bindings to libgit2 instead.

In this particular case this improves on

Jguer#1405
@ljrk0
Copy link

ljrk0 commented Apr 17, 2021

Likely the git CLI exits with 128 since it isn't run on an interactive terminal as it expects. One could either force/fake that or ask for credentials on ones own and pass it to the CLI.

Alternatively, long-term, one may transition to using the libgit2 Go bindings by Git2Go. Using these, this particular function is quite easy to implement, I did a PoC here: https://github.com/ljrk0/yay/tree/git2go

Instead of weird exit codes this yields the far more nice error message:

-> remote authentication required but no callback set

And supplying a callback to ask for authentication within yay should be okay-ish to implement, if there's a demand. But I don't think it makes sense to introduce a dependency on Git2Go and libgit2 for just that function. I don't have much experience with Go and neither of these libraries so I likely won't have time porting these, even if @Jguer agrees that this'd be a good way forward.

@Alessandar
Copy link

Alessandar commented Jun 22, 2021

I got a lot of "signal: killed" and "exit status 128" after updating with the --devel switch on. I found that it related to the kde plasma -git packages I installed. Some of those PKGBUILD's had either outdated sources that led to redirects or error pages. It initially built the packages but their git repos were not recorded in the vcs.json or they were written there with bad repo links.

these packages for example.
ark-git
polkit-qt5-git
qtcurve-git

So I don't think it's yay that's got the issue, it's how the PKGBUILDS are made.

Still learning IT stuff and this is my first bug/issue report. Hope it made some sense and helps. :)

@rien333
Copy link
Author

rien333 commented Jun 22, 2021

So I don't think it's yay that's got the issue, it's how the PKGBUILDS are made.

I think earlier in the thread we had already established that it was a yay issue. (or, more specifically, related to the way yay and git work together)

So I don't think it's yay that's got the issue, it's how the PKGBUILDS are made.

If it was an issue with certain PKGBUILDs, then running e.g. yay -S ark-git should also produce exit status 128 errors, but I've never seen that error outside of using --devel.

@RubenKelevra
Copy link

I think yay just fails to find the data for a devel package, but it should print an appropriate warning instead of this cryptic message that it received a non-zero return code from git.

@Jguer
Copy link
Owner

Jguer commented Jul 3, 2021

#1543 should help diagnose the misbehaving package

image

@guglovich
Copy link

guglovich commented Oct 14, 2021

I have this error without using --devel
I solved the problem by manually creating a yay folder. But it is unclear why yay itself stopped doing it.

@eanschuetz
Copy link

I have this issue again for all devel packages with a GitHub remote. For instance:
devel check for package failed: '/usr/bin/git ls-remote https://github.com/ohmyzsh/ohmyzsh.git HEAD' encountered an error: signal: killed
Manually running /usr/bin/git ls-remote https://github.com/ohmyzsh/ohmyzsh.git HEAD produces no error and gives the correct output, so I'm a bit stumped. My .gitconfig is also effectively empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests