0

I am trying to run pacman from a script. The problem is that a package should be installed that conflicts and provides, but not replaces a currently installed package. As answered here I passed the --noconfirm option and since pacman's stdin is not pointing to a tty it assumed the default answer which is no. How can I enforce pacman to answer yes to all questions? Please note that I can't pass any input to pacman (it's run via makechrootpkg) so I'm unable to use the yes command or similar as suggested here.

Here is the output of pacman:

loading packages...
resolving dependencies...
looking for conflicting packages...
:: libinput-ubuntu and libinput are in conflict. Remove libinput? [y/N] 
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
  • If this is in a chroot, why do you have a conflict in the first place? – HalosGhost Apr 6 '16 at 16:43
  • @HalosGhost I am installing some packages into the chroot and makechrootpkg doesn't install them at once but one after another; so the conflicting package gets installed due to a dependency of another one I pass via the -I flag – msrd0 Apr 6 '16 at 16:53
2

Since there doesn't seem to be an option for achieving that, I looked into pacman source code and created a patch to add a --yes option to pacman: https://bugs.archlinux.org/task/48835

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.