\fI\-t, \-\-type\fR <resolvable_type>
Type of resolvable (default: package)
.TP
-.I \-y, \-\-no-confirm
-Don't require user confirmation.
+.I \-y, \-\-no\-confirm
+Don't require user confirmation to proceed with installation.
+.TP
+.I \-l, \-\-auto\-agree\-with\-licenses
+Automatically say 'yes' to third party license confirmation prompt. By using this option, you choose to agree with licenses of all third-party software this command will install. This option is particularly useful for administators installing the same set of packages on multiple machines (by an automated process) and have the licenses confirmed before.
.TP
.B list-updates (lu) [options]
.I \-y, \-\-no-confirm
Don't require user confirmation.
.TP
-.I \-\-skip\-interactive
-This will skip interactive patches, that is those that need a reboot,
+.I \-\-skip\-interactive
+This will skip interactive patches, that is, those that need reboot,
contain a message, or update a package whose license needs to be
confirmed.
+.TP
+.I \-l, \-\-auto\-agree\-with\-licenses
+Automatically say 'yes' to third party license confirmation prompt. By using this option, you choose to agree with licenses of all third-party software this command will install. This option is particularly useful for administators installing the same set of packages on multiple machines (by an automated process) and have the licenses confirmed before.
.B NOTE:
Zypper prefers to update only those packages for which a patch
.TP
\fI\-n, \-\-no\-refresh\fR
Add the repository with auto-refresh disabled.
+.TP
+NOTE: This command does not automatically refresh the newly added repositories. You have to use the \fBrefresh\fR command after finishing your modifications to repositories with \fB*repo\fR commands.
.TP
.B removerepo (rr) [options] <alias|URI>
.B refresh (ref)
Refresh all installation sources found in system.
.IP
-This means downloading resolvables' metadata from source media and storing it in local cache, typically under /var/lib/zypp/cache.
+This means downloading resolvables' metadata from source media (if needed), storing it in local cache (typically under /var/lib/zypp/cache/raw directory) and preparsing the metadata into an sqlite database (/var/lib/zypp/cache/zypp.db).
.SH "GLOBAL OPTIONS"
.TP
Increase verbosity. For debugging output specify this option twice.
.TP
.I \-q, \-\-quiet
-Suppress normal output. Brief error messages will still be printed on standard error output. If used together with conflicting --verbose option, the --verbose option takes preference.
+Suppress normal output. Brief messages will still be printed though. If used together with conflicting --verbose option, the --verbose option takes preference.
.TP
.I \-t, \-\-terse
Terse output for machine consumption.
Turns on rug compatibility. See compatibility notes next to affected commands.
.TP
.I \-\-non\-interactive
-Switches to non-interactive mode. In this mode zypper doesn't ask user to type answers to various prompts, but uses default answers automatically. (Under development, use only with install, update, and remove commands for other than debugging purposes)
+Switches to non-interactive mode. In this mode zypper doesn't ask user to type answers to various prompts, but uses default answers automatically.
.TP
.I \-\-no\-gpg\-checks
Ignore gpg check failures and continue.
.SH "FILES"
.TP
-.B /var/lib/zypp/cache
-Directory for storing metadata contained in installation sources.
+.B /etc/zypp/repos.d
+Directory containing repository configuration (*.repo) files. You can use the \fBrepo\fR commands to manipulate these files, or you can edit them yourself. In either case, after doing the modifications, executing \fBzypper refresh\fR is strongly recommended.
+.TP
+.B /var/lib/zypp/cache/raw
+Directory for storing raw metadata contained in repositories.
+.TP
+.B /var/lib/zypp/cache/zypp.db
+Sqlite database file containing pre-parsed metadata of all repositories.
.TP
.B ~/.zypper_history
Command history for the shell.
if (it->status().isToBeInstalled() &&
!it->resolvable()->licenseToConfirm().empty())
{
+ if (gSettings.license_auto_agree)
+ {
+ // TranslatorExplanation The first %s is name of the resolvable, the second is its kind (e.g. 'zypper package')
+ cout << format(_("Automatically agreeing with %s %s license."))
+ % it->resolvable()->name() % it->resolvable()->kind().asString()
+ << endl;
+
+ MIL << format("Automatically agreeing with %s %s license.")
+ % it->resolvable()->name() % it->resolvable()->kind().asString()
+ << endl;
+
+ continue;
+ }
+
cout << it->resolvable()->name() << " " <<
it->resolvable()->kind().asString() <<
" " << _("license") << ": " <<
{
cerr << resolvable << endl;
display_error (error, description);
- return (Action) read_action_ari ();
+ return (Action) read_action_ari (ABORT);
}
virtual void finish( zypp::Resolvable::constPtr /*resolvable*/, Error error, const std::string & reason )
cerr_v << "Will retry more aggressively" << endl;
return ABORT;
}
- return (Action) read_action_ari ();
+ return (Action) read_action_ari (ABORT);
}
virtual void finish( zypp::Resolvable::constPtr /*resolvable*/, Error error, const std::string & reason, RpmLevel level )
{
display_done ();
display_error (error, description);
- return (Action) read_action_ari ();
+ return (Action) read_action_ari (ABORT);
}
virtual void finish( zypp::Repository /*repo*/, const std::string & task, Error error, const std::string & reason )
}
else if (command == ZypperCommand::INSTALL) {
static struct option install_options[] = {
- {"catalog", required_argument, 0, 'c'},
- {"type", required_argument, 0, 't'},
- {"no-confirm", no_argument, 0, 'y'},
- {"help", no_argument, 0, 'h'},
+ {"catalog", required_argument, 0, 'c'},
+ {"type", required_argument, 0, 't'},
+ {"no-confirm", no_argument, 0, 'y'},
+ {"auto-agree-with-licenses", no_argument, 0, 'l'},
+ {"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
specific_options = install_options;
" Command options:\n"
"\t--catalog,-c\t\t\tOnly from this catalog (under development)\n"
"\t--type,-t <resolvable_type>\tType of resolvable (default: package)\n"
- "\t--no-confirm,-y\t\t\tDo not require user confirmation\n"
+ "\t--no-confirm,-y\t\t\tDo not require user confirmation to proceed with installation\n"
+ "\t--auto-agree-with-licenses,-l\tAutomatically say 'yes' to third party license confirmation prompt.\n"
+ "\t\t\t\t\tSee man zypper for more details.\n"
);
}
else if (command == ZypperCommand::REMOVE) {
}
else if (command == ZypperCommand::UPDATE) {
static struct option update_options[] = {
- {"type", required_argument, 0, 't'},
- {"no-confirm", no_argument, 0, 'y'},
- {"skip-interactive", no_argument, 0, 0},
+ {"type", required_argument, 0, 't'},
+ {"no-confirm", no_argument, 0, 'y'},
+ {"skip-interactive", no_argument, 0, 0},
+ {"auto-agree-with-licenses", no_argument, 0, 'l'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
"\t--type,-t <resolvable_type>\tType of resolvable (default: patch)\n"
"\t--no-confirm,-y\t\t\tDo not require user confirmation\n"
"\t--skip-interactive\t\tSkip interactive updates\n"
+ "\t--auto-agree-with-licenses,-l\tAutomatically say 'yes' to third party license confirmation prompt.\n"
+ "\t\t\t\t\tSee man zypper for more details.\n"
);
}
else if (command == ZypperCommand::SEARCH) {
}
gData.packages_to_install = arguments;
+
+ if (copts.count("auto-agree-with-licenses"))
+ gSettings.license_auto_agree = true;
}
if (command == ZypperCommand::REMOVE) {
return ZYPPER_EXIT_ERR_PRIVILEGES;
}
+ if (copts.count("auto-agree-with-licenses"))
+ gSettings.license_auto_agree = true;
+
string skind = copts.count("type")? copts["type"].front() :
gSettings.is_rug_compatible? "package" : "patch";
kind = string_to_kind (skind);
is_rug_compatible(false),
non_interactive(false),
no_gpg_checks(false),
+ license_auto_agree(false),
root_dir("/")
{}
bool is_rug_compatible;
bool non_interactive;
bool no_gpg_checks;
+ bool license_auto_agree;
std::string root_dir;
};