I try to use zypper in a script in non-interactive mode to upgrade all packages:
sudo zypper --non-interactive --no-gpg-checks --gpg-auto-import-keys --non-interactive-include-reboot-patches update
It answers the first question “Continue?” correctly with yes.
The second question is “Do you agree with the terms of the license?”, and it answers it with its default no.
Which of course causes the whole operation to be aborted.
I read in this post from 2007 that “zypper should now (version 0.8.3+) finally be ready for use in automated
processes by providing several new options”. One of the options described there, is:
special option for install and update commands. By using this, user declares he/she agrees with terms of licenses the command will install, and zypper will automatically say yes to license confirmation prompt.
This sounds like exactly what I would need.
However, the zypper 1.11.32 in openSUSE 13.2 does not support his option, and none of the other options that seem to have to do with interactiveness seem to handle this.
I also need to use zypper in non-interactive mode to install packages.
My questions are:
- What happened to the --auto-agree-with-licenses option?
- Is there a way to get the license question answered with yes, non-interactively?