[softwaremgmt] using zypper in automated processes
Hi there, zypper should now (version 0.8.3+) finally be ready for use in automated processes by providing several new options: --non-interactive global option - when using this option it is guaranteed that zypper will not hang prompting for an answer on stdin, or in an endless loop. Zypper will automatically answer the questions with default answers, influenced by some other options --no-gpg-checks global option - always choose to continue if some of the gpg checks fails, e.g. a repository file is not signed and should be, file is signed and gpg check fails, etc. --auto-agree-with-licenses 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 is useful for people installing the same set of packages on multiple machines (by an automated process) and have read all the licenses before. LIST OF PROMPTS: The following should be a complete list of cases where zypper needs user interaction together with the answers in non-interactive mode. All the additional options mentioned here have higher priority over --non-interactive, so if used, the answer the imply are automatically used even if --non-interactive isn't used. gpg callbacks: where --no-gpg-checks is applied, a message is displayed or a warning is written to stderr and logged. - accept unsigned file? default: N, with --no-gpg-checks: Y - import key into keyring? always: N (new key can be imported only in interactive mode) - accept unknown key? default: N, with --no-gpg-checks: Y - trust key? default: N, with --no-gpg-checks: Y - verification of signed file failed, continue? default: N, with --no-gpg-checks: Y - no digest for a file, continue? default: N, with --no-gpg-checks: Y - accept unknown digest? default: N, with --no-gpg-checks: Y - accept wrong digest? default: N, with --no-gpg-checks: Y other prompts: - proceed with installation/removal/update? always: Y in addition, the --no-confirm option can be used with the above commands, even without global --non-interactive - confirm 3rd party license default: N, with --auto-agree-with-licenses: Y in addition, for zypper update, --skip-interactive option can be used to exclude interactive patches from to-be-installed list (heritage of rug) - problem while installing/removing a resolvable, Abort/Retry/Ignore? always: ABORT (this is ugly and can be improved in future) - problem while downloading a package, Abort/Retry/Ignore? always: ABORT (this is also ugly, can be enhanced somehow in the future) - dependency conflict. Prompt for solution number, (c)ancel, or (r)etry always: c Also, several different exit codes listed in zypper's manual page can be checked for when using zypper in an automated process. Feedback is welcome, as well as bug reports. I will also wikify this, after some time. Cheers, Jano -- Jan Kupec, YaST team member -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
On Thu, Jul 19, 2007 at 10:04:33AM +0200, Jan Kupec wrote:
Hi there,
zypper should now (version 0.8.3+) finally be ready for use in automated processes by providing several new options:
--auto-agree-with-licenses 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 is useful for people installing the same set of packages on multiple machines (by an automated process) and have read all the licenses before.
The corresponding option for rug in SLE10 SP1 is "--agree-to-third-party-licences". Can you please rename it in zypper?
gpg callbacks: where --no-gpg-checks is applied, a message is displayed or a warning is written to stderr and logged.
- accept unsigned file? default: N, with --no-gpg-checks: Y
- import key into keyring? always: N (new key can be imported only in interactive mode)
- accept unknown key? default: N, with --no-gpg-checks: Y
- trust key? default: N, with --no-gpg-checks: Y
- verification of signed file failed, continue? default: N, with --no-gpg-checks: Y
- no digest for a file, continue? default: N, with --no-gpg-checks: Y
- accept unknown digest? default: N, with --no-gpg-checks: Y
- accept wrong digest? default: N, with --no-gpg-checks: Y
rug+zmd separate this to "security-level" none, checksum, or signature, allowing a middle ground where the metadata has checksums but it is not signed or the key is not trusted. I am not sure how useful it actually is. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
Martin Vidner wrote:
--auto-agree-with-licenses 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 is useful for people installing the same set of packages on multiple machines (by an automated process) and have read all the licenses before.
The corresponding option for rug in SLE10 SP1 is "--agree-to-third-party-licences". Can you please rename it in zypper?
I believe "agree to" is an incorrect english. Maybe rug people can align their option name to zypper's. However, i don't see any reason why rug and zypper should have the same option names (considering that we don't need to provide compatibility with rug after a specific version (don't know what version it is from memory)). J. -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
* Jan Kupec <jkupec@suse.cz> [Jul 19. 2007 14:57]:
Martin Vidner wrote:
--auto-agree-with-licenses 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 is useful for people installing the same set of packages on multiple machines (by an automated process) and have read all the licenses before.
The corresponding option for rug in SLE10 SP1 is "--agree-to-third-party-licences". Can you please rename it in zypper?
I believe "agree to" is an incorrect english. Maybe rug people can align their option name to zypper's.
However, i don't see any reason why rug and zypper should have the same option names (considering that we don't need to provide compatibility with rug after a specific version (don't know what version it is from memory)).
Well, any rug version released for SLE10 is the 'specific version' you're referring to ;-) So if rug for SLE10 SP1 has this option, zypper must also support it. Klaus -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
Klaus Kaempf wrote:
* Jan Kupec <jkupec@suse.cz> [Jul 19. 2007 14:57]:
--auto-agree-with-licenses 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 is useful for people installing the same set of packages on multiple machines (by an automated process) and have read all the licenses before. The corresponding option for rug in SLE10 SP1 is "--agree-to-third-party-licences". Can you please rename it in zypper? I believe "agree to" is an incorrect english. Maybe rug people can align
Martin Vidner wrote: their option name to zypper's.
However, i don't see any reason why rug and zypper should have the same option names (considering that we don't need to provide compatibility with rug after a specific version (don't know what version it is from memory)).
Well, any rug version released for SLE10 is the 'specific version' you're referring to ;-)
So if rug for SLE10 SP1 has this option, zypper must also support it.
i'll check it, and if that's the case, i'll correct zypper. J. -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
participants (3)
-
Jan Kupec
-
Klaus Kaempf
-
Martin Vidner