#
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "11")
-SET(VERSION_PATCH "37")
+SET(VERSION_PATCH "38")
-# LAST RELEASED: 1.11.37
+# LAST RELEASED: 1.11.38
#=======
.\" Title: zypper
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 09/09/2015
+.\" Date: 09/29/2015
.\" Manual: ZYPPER
.\" Source: SUSE Linux
.\" Language: English
.\"
-.TH "ZYPPER" "8" "09/09/2015" "SUSE Linux" "ZYPPER"
+.TH "ZYPPER" "8" "09/29/2015" "SUSE Linux" "ZYPPER"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
The ZYPP library is locked, e\&.g\&. packagekit is running\&.
.RE
.PP
+\fB8\fR \- \fBZYPPER_EXIT_ERR_COMMIT\fR
+.RS 4
+An error occurred during installation or removal of packages\&. You may run
+\fBzypper verify\fR
+to repair any dependency problems\&.
+.RE
+.PP
\fB100\fR \- \fBZYPPER_EXIT_INF_UPDATE_NEEDED\fR
.RS 4
Returned by the patch\-check command if there are patches available for installation\&.
No repositories are defined.
*7* - *ZYPPER_EXIT_ZYPP_LOCKED*::
The ZYPP library is locked, e.g. packagekit is running.
+*8* - *ZYPPER_EXIT_ERR_COMMIT*::
+ An error occurred during installation or removal of packages. You may run *zypper verify* to repair any dependency problems.
*100* - *ZYPPER_EXIT_INF_UPDATE_NEEDED*::
Returned by the patch-check command if there are patches available for installation.
*101* - *ZYPPER_EXIT_INF_SEC_UPDATE_NEEDED*::
export LC_ALL=""
export LANG="en"
-EDITOR=${EDITOR:-vi}
+
+function Edit()
+{
+ local FILE="$1"
+ vi "$FILE"
+ sed -i 's/ \+$//' "$FILE"
+}
EMAIL="$(git config --get user.email)"
echo
case "${RES:-e}" in
[eE]*)
- $EDITOR $VERSIONFILE
+ Edit $VERSIONFILE
continue
;;
[P])
RES=e
while [ "$RES" == "e" ]; do
- $EDITOR $TMPFILE
+ Edit $TMPFILE
echo
awk '{print}/^----------/{n=n+1; if ( n == 2 ) exit 0; }' $TMPFILE
read -n 1 -p "$(Gecho "(a)bort, (c)ontinue, (s)ubmitt, (e)dit : ")" RES
-------------------------------------------------------------------
+Tue Sep 29 18:51:22 CEST 2015 - ma@suse.de
+
+- Return ZYPPER_EXIT_ERR_COMMIT if an error occurred during commit
+ (bsc#946750, FATE#319467)
+- Do not return 0 if a commit was not performed (bsc#946750,
+ FATE#319467)
+- BuildRequires: libzypp-devel >= 14.42.0
+- version 1.11.38
+
+-------------------------------------------------------------------
Thu Sep 24 15:11:01 CEST 2015 - ma@suse.de
- zypper.conf: new option commit/psCheckAccessDeleted to avoid 'lsof'
- Add git-like subcommand support for zypper.
Zypper subcommands are standalone executables that live in the
- zypper exec dir or are available in your $PATH (see zypper(8)).
+ zypper exec dir or are available in your $PATH (see zypper(8)).
- version 1.11.33
-------------------------------------------------------------------
-------------------------------------------------------------------
Mon Jun 1 16:17:02 CEST 2015 - ma@suse.de
-- removerepo: Warn user that deleting a service repo is a
+- removerepo: Warn user that deleting a service repo is a
volatile change (bnc#929990)
- version 1.11.30
-------------------------------------------------------------------
Thu Apr 2 18:25:19 CEST 2015 - ma@suse.de
-- Fix prompt returning undefined default value after wrong input
+- Fix prompt returning undefined default value after wrong input
(bnc#925696)
- man: fix typo (bnc#923800)
- version 1.11.25
Wed Jan 14 11:30:43 CET 2015 - ma@suse.de
- New global option --releasever: Set the value of the $releasever
- variable in all .repo files. This can be used to switch to new
+ variable in all .repo files. This can be used to switch to new
distribution repositories when performing a distribution upgrade.
(bnc#911658)
- BuildRequires: libzypp-devel >= 14.34.0
-------------------------------------------------------------------
Fri Aug 29 15:06:07 CEST 2014 - ma@suse.de
-- download: use $XDG_CACHE_HOME/zypp/packages for non-root user
+- download: use $XDG_CACHE_HOME/zypp/packages for non-root user
(bnc#891515)
- download --dry-run: list packages we would download
- Accept -f,--force option with refresh-services(refs)
-------------------------------------------------------------------
Mon Jul 14 17:49:48 CEST 2014 - ma@suse.de
-- refresh-services: add option --restore-status to undo user
+- refresh-services: add option --restore-status to undo user
modifications applied to service repositories
- drop rug compatibility in manpage docs and help output
(FATE#317708)
-------------------------------------------------------------------
Thu May 8 19:01:49 CEST 2014 - ma@suse.de
-- Notify user about expiring trusted keys; show trusted keys in
+- Notify user about expiring trusted keys; show trusted keys in
verbose mode.
- Enable --with-interactive for update too (bnc#827953)
- Highlight missing update repos in product info
-------------------------------------------------------------------
Wed Jan 29 10:57:54 CET 2014 - ma@suse.de
-- Don't treat missing packages due to download mode as error in
+- Don't treat missing packages due to download mode as error in
fileconflict check.
- Add --replacefiles option to resolve file conflicts (bnc#673720)
- version 1.10.4
Tue Mar 19 13:55:03 CET 2013 - ma@suse.de
- disable repo permanently if required by user
-- also search in file list when searching for a path name in
+- also search in file list when searching for a path name in
provides (bnc #798290)
- add option --verbose to search command (show details about matches)
- enable substrings and wildcards for 'info' (bnc #741758)
-- add search for provides, requires, conflicts, suggests and obsoletes,
+- add search for provides, requires, conflicts, suggests and obsoletes,
search for capabilities
- version 1.8.13
-------------------------------------------------------------------
Thu Feb 7 14:30:47 CET 2013 - ma@suse.de
-- zypper commandline args must not silently overrule locks
+- zypper commandline args must not silently overrule locks
(bnc#742633,bnc#788863)
- version 1.8.10
-------------------------------------------------------------------
Wed Jan 30 12:32:41 CET 2013 - ma@suse.de
-- Add '--oldpackage' to allow rollback without malicious --force
+- Add '--oldpackage' to allow rollback without malicious --force
(bnc#795076)
- Add missing --recommends to verify command (bnc#722551)
- version 1.8.9
Fri Jan 18 21:17:52 CET 2013 - ma@suse.de
- Add source-download command (fate#313445)
-- Fixing permissions is obsolete since zypper refresh wrapper has
+- Fixing permissions is obsolete since zypper refresh wrapper has
been dropped (bnc#764119)
- Fix excess whitespace in install counter (bnc#674572)
- version 1.8.8
-------------------------------------------------------------------
Thu Oct 25 18:08:59 CEST 2012 - ma@suse.de
-- Fix source-install to accept package names and lookup their
+- Fix source-install to accept package names and lookup their
source package (bnc#785832)
- version 1.8.5
- Fix spacing bug in progress bar (bnc#674572)
- consider dual width fonts in output (bnc#766443)
-- Don't treat patches with licensed packages as interactive if
+- Don't treat patches with licensed packages as interactive if
--auto-agree-with-licenses is used (bnc#730824)
- version 1.7.3
-------------------------------------------------------------------
Tue Jan 10 13:52:48 CET 2012 - ma@suse.de
-- Return nonzero (104 - INF_CAP_NOT_FOUND) when query matches no
+- Return nonzero (104 - INF_CAP_NOT_FOUND) when query matches no
package (bnc#719690)
-------------------------------------------------------------------
-------------------------------------------------------------------
Fri May 13 11:38:30 CEST 2011 - ma@suse.de
-- fix get_installed_providers by capability not to use selectables
+- fix get_installed_providers by capability not to use selectables
(bnc#693576)
- 1.6.3
-------------------------------------------------------------------
Fri Apr 15 21:50:24 CEST 2011 - ma@suse.de
-- Fix list-patches/updates xml output to include architecture and
+- Fix list-patches/updates xml output to include architecture and
patch status information (bnc#687529)
- Fix search xml output to actually write xml. (bnc#687529)
- 1.5.8
-------------------------------------------------------------------
Fri Jan 14 12:48:51 CET 2011 - ma@suse.de
-- Report service plugin excetions during refresh, but continue.
+- Report service plugin excetions during refresh, but continue.
-------------------------------------------------------------------
Thu Dec 23 14:49:05 CET 2010 - dheidler@suse.de
-------------------------------------------------------------------
Mon May 3 13:26:06 CEST 2010 - ma@suse.de
-- Don't suggest "zypper ps" after update, if zypper itself is the only
+- Don't suggest "zypper ps" after update, if zypper itself is the only
process with deleted files open.
-------------------------------------------------------------------
-------------------------------------------------------------------
Wed Feb 10 16:01:15 CET 2010 - ma@suse.de
-- Fix 'zypper products' failing to list installed products under
+- Fix 'zypper products' failing to list installed products under
certain conditions (bnc #578721)
- Fix SEGV if $HOME or $PWD are unset in the environment (bnc #578684)
- 1.2.17
-------------------------------------------------------------------
Fri Nov 6 15:24:22 CET 2009 - ma@suse.de
-- al/rl: Support 'kind:name' notation if -t is not given. Also required
+- al/rl: Support 'kind:name' notation if -t is not given. Also required
to remove a specific lock as rl does not yet support -t. (bnc 551956)
-------------------------------------------------------------------
zypper.out().error(str::form(
_("'%s' is not a package name or capability."), arg.c_str()));
zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
- ZYPP_THROW(ExitRequestException());
+ ZYPP_THROW(ExitRequestException("cli option given after args"));
}
MIL << "got " << (dont?"un":"") << "wanted '" << parsedcap << "'";
// if the package updates. Technically every app-package update
// is an 'application reinstall', because the providing package
// changes.
- return;
+ continue;
label = _PL(
"The following application is going to be reinstalled:",
"The following %d applications are going to be reinstalled:",
{
out().error(
_("The path specified in the --root option must be absolute."));
- _exit_code = ZYPPER_EXIT_ERR_INVALID_ARGS;
+ setExitCode( ZYPPER_EXIT_ERR_INVALID_ARGS );
return;
}
catch (const AbortRequestException & ex)
{
ZYPP_CAUGHT(ex);
-
// << _("User requested to abort.") << endl;
out().error(ex.asUserString());
}
catch (const ExitRequestException & e)
{
- MIL << "Caught exit request:" << endl << e.msg() << endl;
+ ZYPP_CAUGHT(e);
+ MIL << "Caught exit request: exitCode " << exitCode() << endl;
}
catch (const Exception & ex)
{
out().error(excpt_r.asString());
setExitCode(ZYPPER_EXIT_ZYPP_LOCKED);
- throw (ExitRequestException("ZYpp locked"));
+ ZYPP_THROW( ExitRequestException("ZYpp locked") );
}
else
{
out().error(e.asString());
setExitCode(ZYPPER_EXIT_ZYPP_LOCKED);
- throw (ExitRequestException("ZYpp locked"));
+ ZYPP_THROW( ExitRequestException("ZYpp locked") );
}
}
}
ZYPP_CAUGHT (excpt_r);
out().error(excpt_r.msg());
setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- throw (ExitRequestException("ZYpp error, cannot get ZYpp lock"));
+ ZYPP_THROW( ExitRequestException("ZYpp error, cannot get ZYpp lock") );
}
}
// === execute command ===
"Patches are not installed in sense of copied files, database records,\n"
"or similar."));
setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
- throw ExitRequestException("not implemented");
+ ZYPP_THROW( ExitRequestException("not implemented") );
}
// can't remove source package
out().error(
_("Uninstallation of a source package not defined and implemented."));
setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
- throw ExitRequestException("not implemented");
+ ZYPP_THROW( ExitRequestException("not implemented") );
}
// parse the download options to check for errors
out().error(str::form(_("%s contradicts %s"),
"--capability", (sropts.force ? "--force" : "--name")));
setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
- ZYPP_THROW(ExitRequestException());
+ ZYPP_THROW(ExitRequestException("invalid args"));
}
if (install_not_remove && sropts.force_by_cap && sropts.force)
out().error(str::form(_("%s cannot currently be used with %s"),
"--force", "--capability"));
setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
- ZYPP_THROW(ExitRequestException());
+ ZYPP_THROW(ExitRequestException("invalid args"));
}
if (install_not_remove && (optit = copts.find("from")) != copts.end())
{
setExitCode(ZYPPER_EXIT_INF_CAP_NOT_FOUND);
if (globalOpts().non_interactive)
- ZYPP_THROW(ExitRequestException());
+ ZYPP_THROW(ExitRequestException("name or capability not found"));
}
// give user feedback from package selection
{
setExitCode(ZYPPER_EXIT_INF_CAP_NOT_FOUND);
if (globalOpts().non_interactive)
- ZYPP_THROW(ExitRequestException());
+ ZYPP_THROW(ExitRequestException("name or capability not found"));
}
}
class ExitRequestException : public zypp::Exception
{
public:
- ExitRequestException(const std::string & msg = "") : zypp::Exception(msg) {}
+ ExitRequestException(const std::string & msg ) : zypp::Exception(msg) {}
};
#endif /*ZYPPER_H*/
#define ZYPPER_EXIT_ERR_PRIVILEGES 5 // unsufficient privileges for the operation
#define ZYPPER_EXIT_NO_REPOS 6 // no repositories defined
#define ZYPPER_EXIT_ZYPP_LOCKED 7 // libzypp is locked, e.g. packagekit is running
+#define ZYPPER_EXIT_ERR_COMMIT 8 // an error occurred during commit.
// info
#define ZYPPER_EXIT_INF_UPDATE_NEEDED 100 // update needed
);
zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
- throw ExitRequestException(
- "Target initialization failed: " + e.msg());
+ ZYPP_THROW( ExitRequestException("Target initialization failed: " + e.msg()) );
}
done = true;
report_unknown_repos(zypper.out(), not_found);
if (!not_found.empty())
- throw ExitRequestException("Some of specified repositories were not found.");
+ {
+ zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
+ ZYPP_THROW( ExitRequestException("Some of specified repositories were not found.") );
+ }
if ( ! specified.empty() )
{
if (zypper.cOpts().count("debug-solver"))
{
make_solver_test_case(zypper);
- return;
+ return; // ZYPPER_EXIT_OK
}
MIL << "got solution, showing summary" << endl;
(summary.packagesToGetAndInstall() &&
zypper.command() == ZypperCommand::REMOVE);
- bool do_commit = false;
PromptOptions popts;
// translators: These are the "Continue?" prompt options corresponding to
// "Yes / No / show Problems / Versions / Arch / Repository /
string prompt_text = _("Continue?");
+ bool do_commit = false;
unsigned int reply;
do
{
if (need_another_solver_run)
continue;
- // COMMIT
-
- if (do_commit)
+ if ( ! do_commit )
{
+ zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ return;
+ }
+ else
+ {
+ // COMMIT
+
if (!confirm_licenses(zypper))
+ {
+ zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
return;
+ }
try
{
gData.rpm_pkgs_total = God->resolver()->getTransaction().actionSize();
gData.rpm_pkg_current = 0;
- ostringstream s;
- s << _("committing"); MIL << "committing...";
- if (copts.count("dry-run"))
- s << " " << _("(dry run)") << endl;
- zypper.out().info(s.str(), Out::HIGH);
+ MIL << "committing..." << endl;
+ if ( zypper.out().verbosity() >= Out::HIGH )
+ {
+ ostringstream s;
+ s << _("committing");
+ if ( copts.count("dry-run") )
+ s << " " << _("(dry run)");
+ zypper.out().info( s.str(), Out::HIGH );
+ }
ZYppCommitResult result = God->commit(get_commit_policy(zypper));
-
- MIL << endl << "DONE" << endl;
-
gData.show_media_progress_hack = false;
- if ( ! result.noError() )
- zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ USR << dump(result.transaction()) << endl;
+ if ( !result.allDone() && !( copts.count("dry-run") && result.noError() ) )
+ { zypper.setExitCode( result.attemptToModify() ? ZYPPER_EXIT_ERR_COMMIT : ZYPPER_EXIT_ERR_ZYPP ); } // error message comes later....
- s.clear(); s << result;
- zypper.out().info(s.str(), Out::HIGH);
+ MIL << endl << "DONE" << endl;
+ if ( zypper.out().verbosity() >= Out::HIGH )
+ {
+ ostringstream s;
+ s << result;
+ zypper.out().info( s.str(), Out::HIGH );
+ }
show_update_messages(zypper, result.updateMessages());
}
zypper.out().error(e,
_("Problem retrieving the package file from the repository:"),
_("Please see the above error message for a hint."));
- zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ zypper.setExitCode(ZYPPER_EXIT_ERR_COMMIT);
return;
}
catch ( zypp::repo::RepoException & e )
zypper.out().error(e,
_("Problem retrieving the package file from the repository:"),
hint);
- zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ zypper.setExitCode(ZYPPER_EXIT_ERR_COMMIT);
return;
}
catch ( const zypp::FileCheckException & e )
"- refresh the repositories using 'zypper refresh'\n"
"- use another installation medium (if e.g. damaged)\n"
"- use another repository"));
- zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ zypper.setExitCode(ZYPPER_EXIT_ERR_COMMIT);
return;
}
catch ( const Exception & e )
zypper.out().error(e,
_("Problem occured during or after installation or removal of packages:"),
_("Please see the above error message for a hint."));
- zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ zypper.setExitCode(ZYPPER_EXIT_ERR_COMMIT);
+ return;
}
- // install any pending source packages
- //! \todo This won't be necessary once we get a new solver flag
- //! for installing source packages without their build deps
- if (!zypper.runtimeData().srcpkgs_to_install.empty())
- install_src_pkgs(zypper);
-
- // set return value to 'reboot needed'
- if (summary.needMachineReboot())
- {
- zypper.setExitCode(ZYPPER_EXIT_INF_REBOOT_NEEDED);
- zypper.out().warning(
- _("One of installed patches requires reboot of"
- " your machine. Reboot as soon as possible."), Out::QUIET);
- }
- // set return value to 'restart needed' (restart of package manager)
- // however, 'reboot needed' takes precedence
- else if (zypper.exitCode() != ZYPPER_EXIT_INF_REBOOT_NEEDED && summary.needPkgMgrRestart())
- {
- zypper.setExitCode(ZYPPER_EXIT_INF_RESTART_NEEDED);
- zypper.out().warning(
- _("One of installed patches affects the package"
- " manager itself. Run this command once more to install any other"
- " needed patches."),
- Out::QUIET, Out::TYPE_NORMAL); // don't show this to machines
- }
+ if ( zypper.exitCode() != ZYPPER_EXIT_OK )
+ {
+ zypper.out().error(_("Installation has completed with error.") );
+ if ( zypper.exitCode() == ZYPPER_EXIT_ERR_COMMIT )
+ zypper.out().error( boost::format( _("You may run '%1%' to repair any dependency problems.") ) % "zypper verify" );
+ }
+ else
+ {
+ // install any pending source packages
+ //! \todo This won't be necessary once we get a new solver flag
+ //! for installing source packages without their build deps
+ if (!zypper.runtimeData().srcpkgs_to_install.empty())
+ install_src_pkgs(zypper);
+
+ // set return value to 'reboot needed'
+ if (summary.needMachineReboot())
+ {
+ zypper.setExitCode(ZYPPER_EXIT_INF_REBOOT_NEEDED);
+ zypper.out().warning(
+ _("One of installed patches requires reboot of"
+ " your machine. Reboot as soon as possible."), Out::QUIET);
+ }
+ // set return value to 'restart needed' (restart of package manager)
+ // however, 'reboot needed' takes precedence
+ else if (zypper.exitCode() != ZYPPER_EXIT_INF_REBOOT_NEEDED && summary.needPkgMgrRestart())
+ {
+ zypper.setExitCode(ZYPPER_EXIT_INF_RESTART_NEEDED);
+ zypper.out().warning(
+ _("One of installed patches affects the package"
+ " manager itself. Run this command once more to install any other"
+ " needed patches."),
+ Out::QUIET, Out::TYPE_NORMAL); // don't show this to machines
+ }
+ }
// check for running services (fate #300763)
if ( ! ( zypper.cOpts().count("download-only") || zypper.cOpts().count("dry-run") )
zypper.out().info(str::form(_("Available download modes: %s"),
"only, in-advance, in-heaps, as-needed"));
zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
- throw ExitRequestException("Unknown download mode");
+ ZYPP_THROW( ExitRequestException("Unknown download mode") );
}
// warn about the override, both were specified
"If you run zypper without a terminal, use '%s' global\n"
"option to make zypper use default answers to prompts."
), "--non-interactive"));
- throw ExitRequestException("Cannot read input. Bad stream or EOF.");
+ zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP);
+ ZYPP_THROW( ExitRequestException("Cannot read input. Bad stream or EOF.") );
}
if (reply.empty())
BuildRequires: cmake >= 2.4.6
BuildRequires: gcc-c++ >= 4.7
BuildRequires: gettext-devel >= 0.15
-BuildRequires: libzypp-devel >= 14.40.0
+BuildRequires: libzypp-devel >= 14.42.0
BuildRequires: readline-devel >= 5.1
Requires: procps
%if 0%{?suse_version}