Author: jkupec Date: Sun Oct 26 16:10:55 2008 New Revision: 11491 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11491&view=rev Log: - 'rm -t patch' now tells the user that patches can't get uninstalled (bnc #402640) Modified: trunk/zypper/doc/zypper.8 trunk/zypper/src/install.cc Modified: trunk/zypper/doc/zypper.8 URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/doc/zypper.8?rev=11491&... ============================================================================== --- trunk/zypper/doc/zypper.8 (original) +++ trunk/zypper/doc/zypper.8 Sun Oct 26 16:10:55 2008 @@ -138,7 +138,10 @@ .TP .B info (if) <name> ... -Displays full info for the specified packages. +Displays detailed informaion about the specified packages. + +For each specified package, zypper finds the best available version in defined +repositories and shows information for this package. .TP .I -r, --repo <alias|#|URI> @@ -291,7 +294,15 @@ Remove (uninstall) packages. The packages can be selected by their name or by a capability they provide. -For details see the install command +For details on package selection see the install command description. + +Since \fBpatches\fR are not installed in sense of copying files or recording +a database entry, they cannot be uninstalled, even though zypper shows +them as installed. The installed status is determined solely based on +the installed status of its required dependencies. If these dependencies +are satisified, the patch is rendered installed. + +Uninstallation of \fBpatterns\fR is currently not implemented. .TP \fI-r, --repo\fR <alias|#|URI> Modified: trunk/zypper/src/install.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/install.cc?rev=11491&a... ============================================================================== --- trunk/zypper/src/install.cc (original) +++ trunk/zypper/src/install.cc Sun Oct 26 16:10:55 2008 @@ -420,7 +420,27 @@ { if (args.empty()) return; - + + if (kind == ResKind::patch && !install_not_remove) + { + zypper.out().error( + _("Cannot uninstall patches."), + _("Installed status of a patch is determined solely based on its dependencies.\n" + "Patches are not installed in sense of copied files, database records,\n" + "or similar.")); + zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); + throw ExitRequestException("not implemented"); + } + + if (kind == ResKind::pattern && !install_not_remove) + { + //! \todo define and implement pattern removal (bnc #407040) + zypper.out().error( + _("Uninstallation of a pattern is currently not defined and implemented.")); + zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); + throw ExitRequestException("not implemented"); + } + bool force_by_capability = zypper.cOpts().count("capability"); bool force_by_name = zypper.cOpts().count("name"); bool force = zypper.cOpts().count("force"); @@ -431,7 +451,7 @@ { zypper.out().error(boost::str( format(_("%s contradicts %s")) % "--capability" % (force? "--force" : "--name"))); - + zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); ZYPP_THROW(ExitRequestException()); } @@ -498,7 +518,7 @@ zypper.setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS); ZYPP_THROW(ExitRequestException()); } - + // is version specified? by_capability = str.find_first_of("=<>") != string::npos; @@ -579,7 +599,7 @@ // is the provider already installed? bool installed = false; - string provider; + string provider; for_(solvit, q.poolItemBegin(), q.poolItemEnd()) { if (traits::isPseudoInstalled(solvit->resolvable()->kind())) @@ -588,7 +608,7 @@ installed = solvit->status().isInstalled(); if (installed) { - provider = solvit->resolvable()->name(); + provider = solvit->resolvable()->name(); break; } } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org