mnussbaum / ansible-yay

Ansible module to install AUR packages with yay
MIT License
57 stars 14 forks source link

Unable to install packages when there's a choice for dependencies #1

Closed bruno-delfino1995 closed 5 years ago

bruno-delfino1995 commented 6 years ago

When running this task ansible is unable to continue. To be more specific, it stops when installing perl-image-exiftool.

I think the reason for it to stop is that when installing perl-image-exiftool we need to specify which of the dependencies we want - I don't remember specifically which but I can fetch the names later.

I'm not sure if this can be categorized as an issue once this is like a manual step for installing such packages. Anyhow, I'd appreciate some help on how to work around these cases or, even better, a fix that works around it.

mnussbaum commented 5 years ago

Hi there, do you have any more info about what choice yay blocked to prompt you for? I just tried to repro this problem myself and unfortunately couldn't with that package.

I'm not sure what scenarios yay will block and prompt in, but if you can get me some more info or ideally a repro case I'm happy to take a look.

bruno-delfino1995 commented 5 years ago

It seems that yay or pacman skips those choices when installing packages which require a dependency that you've already installed, probably you already had one of the dependencies which provide the files necessary for perl-image-exiftool, I'm not sure how the package manager handles this, but this is that I've noticed.

Another package that may prompt you for choices is polybar, when installing it on my PC yay asked if I wanted polybar or `polybar-git, screenshot below.

providers-choice

However, in the case of polybar, it asks for a choice on providers instead of dependencies. I think that it all depends on PKGBUILD specifications, a subject that I have no knowledge.

If you want to reproduce exactly the error that I first described, I think you'd need to install Arch from scratch and run ./setup from the repository that I've sent. When running the setup you'll notice that ansible stops on yay steps, and then if you run those steps manually you'll see an interactive prompt just like I attached here.

mnussbaum commented 5 years ago

I just tried installing polybar using ansible-yay. The package's long compilation times make it seem as if the tool is blocked, however watching htop reveals that compilation is occurring and eventually the ansible command completes. Perhaps a slow compilation caused your issue as well?

For context, whenever ansible-yay invokes yay it passes the --noconfirm argument, so the command to install a package looks like this, yay -S <package name> --noconfirm. One possibility is that yay isn't respecting the --noconfirm argument during some step and is blocking waiting for use input, but I won't open an issue on yay until I have steps to reproduce it.

I've also tried installing perl-image-exiftool in a fresh arch vagrant box that just has the minimum packages to install yay and ansible. Installing the package using ansible-yay works as expected in that scenario too.

I'm going to close this issue since I can't reproduce the problem. If you are able to reliably reproduce it please feel free to reopen it.