Hello community,
here is the log from the commit of package zypper
checked in at Fri Sep 12 17:32:13 CEST 2008.
--------
--- zypper/zypper.changes 2008-09-10 18:35:03.000000000 +0200
+++ /mounts/work_src_done/STABLE/zypper/zypper.changes 2008-09-12 15:09:43.000000000 +0200
@@ -1,0 +2,21 @@
+Fri Sep 12 13:52:45 CEST 2008 - jkupec@suse.cz
+
+- --xmlout for products, patterns, and product-info
+- fixed patterns to respect --{un,}installed-only options
+- r11032
+- 0.12.4
+
+-------------------------------------------------------------------
+Fri Sep 12 11:29:44 CEST 2008 - jkupec@suse.cz
+
+- --type handling for addservice added
+- r11027
+
+-------------------------------------------------------------------
+Fri Sep 12 10:59:31 CEST 2008 - jkupec@suse.cz
+
+- print a hint to run 'zypper verify' (after install) on ignored
+ failed package download (fate #303527)
+- r11025
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zypper.spec ++++++
--- /var/tmp/diff_new_pack.t29665/_old 2008-09-12 17:32:08.000000000 +0200
+++ /var/tmp/diff_new_pack.t29665/_new 2008-09-12 17:32:08.000000000 +0200
@@ -19,7 +19,7 @@
Name: zypper
-BuildRequires: boost-devel >= 1.33.1 gettext-devel >= 0.15 libzypp-devel >= 5.9.0 readline-devel >= 5.1
+BuildRequires: boost-devel >= 1.33.1 gettext-devel >= 0.15 libzypp-devel >= 5.10.0 readline-devel >= 5.1
BuildRequires: cmake >= 2.4.6 gcc-c++ >= 4.1
Requires: procps
Recommends: logrotate cron
@@ -30,7 +30,7 @@
PreReq: permissions
Summary: Command Line Package Management Using Libzypp
Version: 0.12.4
-Release: 1
+Release: 3
Source: zypper-0.12.4.tar.bz2
Prefix: /usr
Url: http://en.opensuse.org/Zypper
@@ -113,6 +113,18 @@
# it from being erased by rpm -e
%ghost %config(noreplace) %{_var}/log/zypper.log
%changelog
+* Fri Sep 12 2008 jkupec@suse.cz
+- --xmlout for products, patterns, and product-info
+- fixed patterns to respect --{un,}installed-only options
+- r11032
+- 0.12.4
+* Fri Sep 12 2008 jkupec@suse.cz
+- --type handling for addservice added
+- r11027
+* Fri Sep 12 2008 jkupec@suse.cz
+- print a hint to run 'zypper verify' (after install) on ignored
+ failed package download (fate #303527)
+- r11025
* Wed Sep 10 2008 jkupec@suse.cz
- services --with-repos added (also XML)
- r11006
++++++ zypper-0.12.4.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/doc/zypper.8 new/zypper-0.12.4/doc/zypper.8
--- old/zypper-0.12.4/doc/zypper.8 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/doc/zypper.8 2008-09-12 15:09:41.000000000 +0200
@@ -1,4 +1,4 @@
-.TH "zypper" "8" "0.12.3" "zypper" "System Tools"
+.TH "zypper" "8" "0.12.4" "zypper" "System Tools"
.SH "SYNTAX"
.LP
zypper [\fI\-\-global\-options\fR] <\fBcommand\fR> [\fI\-\-command\-options\fR] [\fBcommand-arguments\fR]
@@ -59,6 +59,10 @@
.SS Services
.LP
+Services are one level above repositories and serve to manage repositories
+or to do some special tasks. Libypp currently supports only one type of
+services, the Repository Index Service (RIS).
+.LP
Repository Index Service (RIS) is a special type of repository which contains
a list of other repositories. This list can be generated dynamically by the
server according to some URI parameters or user name, or can be static.
@@ -711,25 +715,74 @@
Clean both repository metadata and package caches.
-.SS Serivce Management
+.SS Service Management
+
+.TP
+.B addservice (as) [options] <URI> <alias>
+Adds a service specified by \fBURI\fR to the system. The \fBalias\fR must be
+unique and serves to identify the services.
-(This group of commands is currently under development)
+Newly added services are not refereshed automatically. Use the
+\fBrefresh-services\fR command to refresh them.
.TP
-.B addservice (as) [options] <url> <alias>
-TODO
+.I \-t, \-\-type <TYPE>
+Type of the service (possible values: ris).
+.TP
+.I \-d, \-\-disable
+Add the service as disabled.
+.TP
+.I \-n, \-\-name
+Specify descriptive name for the service.
.TP
.B removeservice (rs) [options] ...
-TODO
+
+Remove specified repository index service from the sytem.
+
+Removing an RIS service will result in removing of all of its repositories.
+
+.TP
+.I \-\-loose\-auth
+Ignore user authentication data in the URI.
+.TP
+.I \-\-loose-query
+Ignore query string in the URI.
.TP
.B services (ls) [options]
-TODO
+List services defined on the system.
+
+.TP
+.I \-u, \-\-uri
+Show also base URI of repositories.
+.TP
+.I \-p, \-\-priority
+Show also repository priority.
+.TP
+.I \-d, \-\-details
+Show more information like URI, priority, type.
+.TP
+.I \-r, \-\-with\-repos
+Show also repositories belonging to the services.
+.TP
+.I \-P, \-\-sort\-by\-priority
+Sort the list by repository priority.
+.TP
+.I \-U, \-\-sort-by-uri
+Sort the list by URI.
+.TP
+.I \-N, \-\-sort\-by\-name
+Sort the list by name.
.TP
.B refresh-services (refs) [options] ...
-TODO
+Refreshing a service mean executing the service's special task.
+
+RIS services add, remove, or modify repositories on your system based on
+current content of the repository index.
+
+TODO more info
.SS Package Locks Management
@@ -968,7 +1021,7 @@
ZENworks distinguishes services and catalogs. A service is
added by URI and contains one or more catalogs. Libzypp does not have
this distinction (yet) but for compatibility it is able to use the same command
-and option names (service-add, \-\-catalog) as rug.
+and option names (service-add, \-\-catalog) as rug. TODO this info is out-of-date now
.LP
Currently, a Repository in zypper is a synonym for both Service and Catalog in ZLM.
.TP
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/package/zypper.changes new/zypper-0.12.4/package/zypper.changes
--- old/zypper-0.12.4/package/zypper.changes 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/package/zypper.changes 2008-09-12 15:09:41.000000000 +0200
@@ -1,4 +1,25 @@
-------------------------------------------------------------------
+Fri Sep 12 13:52:45 CEST 2008 - jkupec@suse.cz
+
+- --xmlout for products, patterns, and product-info
+- fixed patterns to respect --{un,}installed-only options
+- r11032
+- 0.12.4
+
+-------------------------------------------------------------------
+Fri Sep 12 11:29:44 CEST 2008 - jkupec@suse.cz
+
+- --type handling for addservice added
+- r11027
+
+-------------------------------------------------------------------
+Fri Sep 12 10:59:31 CEST 2008 - jkupec@suse.cz
+
+- print a hint to run 'zypper verify' (after install) on ignored
+ failed package download (fate #303527)
+- r11025
+
+-------------------------------------------------------------------
Wed Sep 10 17:57:09 CEST 2008 - jkupec@suse.cz
- services --with-repos added (also XML)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/callbacks/media.h new/zypper-0.12.4/src/callbacks/media.h
--- old/zypper-0.12.4/src/callbacks/media.h 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/callbacks/media.h 2008-09-12 15:09:41.000000000 +0200
@@ -14,12 +14,15 @@
#include
#include "zypp/ZYppCallbacks.h"
+#include "zypp/base/String.h"
#include "zypp/Pathname.h"
#include "zypp/Url.h"
#include "zypp/media/MediaUserAuth.h"
#include "Zypper.h"
#include "utils/prompt.h"
+#include "utils/messages.h"
+
#define REPEAT_LIMIT 3
@@ -66,6 +69,8 @@
it != devices.end(); ++it)
std::cout << *it << " ";
cout << std::endl;*/
+ DBG << "media problem, url: " << url.asString() << std::endl;
+
Zypper::instance()->out().error(description);
if (is_changeable_media(url) && error == MediaChangeReport::WRONG)
{
@@ -93,8 +98,17 @@
30,action);
}
- return (Action) read_action_ari(PROMPT_ARI_MEDIA_PROBLEM
- ,MediaChangeReport::ABORT);
+ Action action = (Action) read_action_ari(
+ PROMPT_ARI_MEDIA_PROBLEM, MediaChangeReport::ABORT);
+
+ // if an rpm download failed and user chose to ignore that, advice to
+ // run zypper verify afterwards
+ if (action == MediaChangeReport::IGNORE
+ && Zypper::instance()->runtimeData().action_rpm_download
+ && !Zypper::instance()->runtimeData().seen_verify_hint)
+ print_verify_hint(Zypper::instance()->out());
+
+ return action;
}
private:
repeat_counter_ repeat_counter;
@@ -156,10 +170,11 @@
return true;
}
- // not used anywhere in libzypp 3.20.0
+ // not used anywhere in libzypp 3.20.0 (really)
virtual DownloadProgressReport::Action
problem( const zypp::Url & uri, DownloadProgressReport::Error error, const std::string & description )
{
+ DBG << "media problem" << std::endl;
if (_be_quiet)
Zypper::instance()->out().dwnldProgressEnd(uri, _last_drate_avg, true);
Zypper::instance()->out().error(zcb_error2str(error, description));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/callbacks/repo.h new/zypper-0.12.4/src/callbacks/repo.h
--- old/zypper-0.12.4/src/callbacks/repo.h 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/callbacks/repo.h 2008-09-12 15:09:41.000000000 +0200
@@ -167,6 +167,7 @@
<< boost::format(_("(%s unpacked)")) % ro->installSize();
}
zypper.out().info(s.str());
+ zypper.runtimeData().action_rpm_download = true;
}
// return false if the download should be aborted right now
@@ -187,17 +188,20 @@
Action action = (Action) read_action_ari(PROMPT_ARI_RPM_DOWNLOAD_PROBLEM, ABORT);
if (action == DownloadResolvableReport::RETRY)
--Zypper::instance()->runtimeData().commit_pkg_current;
+ else
+ Zypper::instance()->runtimeData().action_rpm_download = false;
return action;
}
// implementation not needed prehaps - the media backend reports the download progress
- /*
- virtual void finish( zypp::Resolvable::constPtr **resolvable_ptr**, Error error, const std::string & reason )
+ virtual void finish( zypp::Resolvable::constPtr /*resolvable_ptr**/, Error error, const std::string & reason )
{
+ Zypper::instance()->runtimeData().action_rpm_download = false;
+/*
display_done ("download-resolvable", cout_v);
display_error (error, reason);
+*/
}
- */
};
struct ProgressReportReceiver : public zypp::callback::ReceiveReportzypp::ProgressReport
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/info.cc new/zypper-0.12.4/src/info.cc
--- old/zypper-0.12.4/src/info.cc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/info.cc 2008-09-12 15:09:41.000000000 +0200
@@ -58,7 +58,7 @@
/**
*
*/
-void printInfo(const Zypper & zypper, const ResKind & kind)
+void printInfo(Zypper & zypper, const ResKind & kind)
{
ResPool pool = God->pool();
@@ -85,10 +85,14 @@
ui::Selectable::constPtr s = *q.selectableBegin();
// print info
// TranslatorExplanation E.g. "Information for package zypper:"
- cout << endl << format(_("Information for %s %s:"))
- % kind_to_string_localized(kind, 1) % *nameit;
-
- cout << endl << endl;
+
+ if (zypper.out().type() != Out::TYPE_XML)
+ {
+ cout << endl << format(_("Information for %s %s:"))
+ % kind_to_string_localized(kind, 1) % *nameit;
+
+ cout << endl << endl;
+ }
if (kind == ResKind::package)
printPkgInfo(zypper, *s);
@@ -100,7 +104,8 @@
printProductInfo(zypper, *s);
else
// TranslatorExplanation %s = resolvable type (package, patch, pattern, etc - untranslated).
- cout << format(_("Info for type '%s' not implemented.")) % kind << endl;
+ zypper.out().info(
+ boost::str(format(_("Info for type '%s' not implemented.")) % kind));
}
}
@@ -140,7 +145,7 @@
</pre>
*
*/
-void printPkgInfo(const Zypper & zypper, const ui::Selectable & s)
+void printPkgInfo(Zypper & zypper, const ui::Selectable & s)
{
PoolItem theone = s.theObj();
PoolItem installed = s.installedObj();
@@ -196,7 +201,7 @@
</pre>
*
*/
-void printPatchInfo(const Zypper & zypper, const ui::Selectable & s )
+void printPatchInfo(Zypper & zypper, const ui::Selectable & s )
{
const PoolItem & pool_item = s.theObj();
printNVA(pool_item.resolvable());
@@ -262,7 +267,7 @@
</pre>
*
*/
-void printPatternInfo(const Zypper & zypper, const ui::Selectable & s)
+void printPatternInfo(Zypper & zypper, const ui::Selectable & s)
{
const PoolItem & pool_item = s.theObj();
@@ -324,21 +329,31 @@
</pre>
*
*/
-void printProductInfo(const Zypper & zypper, const ui::Selectable & s)
+void printProductInfo(Zypper & zypper, const ui::Selectable & s)
{
const PoolItem & pool_item = s.theObj(); // should be the only one
- cout << (zypper.globalOpts().is_rug_compatible ? _("Catalog: ") : _("Repository: "))
- << pool_item.resolvable()->repository().info().name() << endl;
-
- printNVA(pool_item.resolvable());
-
- Product::constPtr product = asKind<Product>(pool_item.resolvable());
- cout << _("Category") << ": " << product->type() << endl;
- cout << _("Flavor") << ": " << product->flavor() << endl;
- cout << _("Installed") << ": " << (pool_item.status().isInstalled() ? "Yes" : "No") << endl;
- cout << _("Short Name") << ": " << product->shortName() << endl;
- printSummaryDesc(pool_item.resolvable());
+ if (zypper.out().type() == Out::TYPE_XML)
+ {
+ Product::constPtr pp = asKind<Product>(pool_item.resolvable());
+ cout
+ << asXML(*pp, pool_item.status().isInstalled())
+ << endl;
+ }
+ else
+ {
+ cout << (zypper.globalOpts().is_rug_compatible ? _("Catalog: ") : _("Repository: "))
+ << pool_item.resolvable()->repository().info().name() << endl;
+
+ printNVA(pool_item.resolvable());
+
+ Product::constPtr product = asKind<Product>(pool_item.resolvable());
+ cout << _("Category") << ": " << product->type() << endl;
+ cout << _("Flavor") << ": " << product->flavor() << endl;
+ cout << _("Installed") << ": " << (pool_item.status().isInstalled() ? "Yes" : "No") << endl;
+ cout << _("Short Name") << ": " << product->shortName() << endl;
+ printSummaryDesc(pool_item.resolvable());
+ }
}
// Local Variables:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/info.h new/zypper-0.12.4/src/info.h
--- old/zypper-0.12.4/src/info.h 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/info.h 2008-09-12 15:09:41.000000000 +0200
@@ -14,14 +14,14 @@
#include "Zypper.h"
-void printInfo(const Zypper & zypper, const zypp::ResKind & kind);
+void printInfo(Zypper & zypper, const zypp::ResKind & kind);
-void printPkgInfo(const Zypper & zypper, const zypp::ui::Selectable & s);
+void printPkgInfo(Zypper & zypper, const zypp::ui::Selectable & s);
-void printPatchInfo(const Zypper & zypper, const zypp::ui::Selectable & s);
+void printPatchInfo(Zypper & zypper, const zypp::ui::Selectable & s);
-void printPatternInfo(const Zypper & zypper, const zypp::ui::Selectable & s);
+void printPatternInfo(Zypper & zypper, const zypp::ui::Selectable & s);
-void printProductInfo(const Zypper & zypper, const zypp::ui::Selectable & s);
+void printProductInfo(Zypper & zypper, const zypp::ui::Selectable & s);
#endif /*ZYPPERINFO_H_*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/output/xmlout.rnc new/zypper-0.12.4/src/output/xmlout.rnc
--- old/zypper-0.12.4/src/output/xmlout.rnc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/output/xmlout.rnc 2008-09-12 15:09:41.000000000 +0200
@@ -1,4 +1,4 @@
-# !! still WORK IN PROGRESS (untill 11.0 freeze) !!
+# !! still WORK IN PROGRESS (untill 11.1 freeze) !!
# namespace zypper
start = stream-element
@@ -13,6 +13,7 @@
update-status-element* | # for zypper list-updates
install-summary-element* | # for zypper install/remove/update
repo-list-element? | # for zypper repos
+ service-list-element? |
selectable-list-element? | # for zypper search
selectable-info-element? | # for zypper info
@@ -136,19 +137,37 @@
)*
}
+
+repo-element =
+ element repo {
+ attribute alias { xsd:string },
+ attribute name { xsd:string }?,
+ attribute type { xsd:string }?,
+ attribute enabled { xsd:boolean }?,
+ attribute autorefresh { xsd:boolean }?,
+ attribute gpgcheck { xsd:boolean }?,
+ attribute gpgkey { xsd:anyURI }?,
+ attribute mirrorlist { xsd:anyURI }?,
+ element url { xsd:anyURI }+
+ }
+
repo-list-element =
element repo-list {
- element repo {
+ repo-element*
+ }
+
+service-list-element =
+ element service-list {
+ element service {
attribute alias { xsd:string },
attribute name { xsd:string }?,
- attribute type { xsd:string }?,
attribute enabled { xsd:boolean }?,
attribute autorefresh { xsd:boolean }?,
- attribute gpgcheck { xsd:boolean }?,
- attribute gpgkey { xsd:anyURI }?,
- attribute mirrorlist { xsd:anyURI }?,
- element url { xsd:anyURI }+
- }*
+ attribute url { xsd:anyURI },
+ attribute type { xsd:string }?,
+ repo-element*
+ }*,
+ repo-element*
}
selectable-list-element =
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/repos.cc new/zypper-0.12.4/src/repos.cc
--- old/zypper-0.12.4/src/repos.cc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/repos.cc 2008-09-12 15:09:41.000000000 +0200
@@ -1977,7 +1977,7 @@
// type
if (service)
- tr << "ris";
+ tr << service->type().asString();
else
tr << repo->type().asString();
@@ -2228,9 +2228,9 @@
ServiceInfo service;
- //! \todo what about service type? compare to rug. idea: do addrepo if type is specified and is not NU.
- //if ( ! type.empty() )
- // repo.setType(RepoType(type));
+ //! \todo addrepo if type is specified and is not 'ris'.
+ if ( ! type.empty() )
+ service.setType(ServiceType(type));
service.setAlias(alias.empty() ? timestamp() : alias);
parsed_opts::const_iterator it = zypper.cOpts().find("name");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/search.cc new/zypper-0.12.4/src/search.cc
--- old/zypper-0.12.4/src/search.cc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/search.cc 2008-09-12 15:09:41.000000000 +0200
@@ -350,8 +350,31 @@
cout << tbl;
}
+static void list_patterns_xml(Zypper & zypper)
+{
+ cout << "<pattern-list>" << endl;
-void list_patterns(Zypper & zypper)
+ bool installed_only = zypper.cOpts().count("installed-only");
+ bool notinst_only = zypper.cOpts().count("uninstalled-only");
+
+ ResPool::byKind_iterator
+ it = God->pool().byKindBegin(ResKind::pattern),
+ e = God->pool().byKindEnd(ResKind::pattern);
+ for (; it != e; ++it )
+ {
+ if (it->isSatisfied() && notinst_only)
+ continue;
+ else if (!it->isSatisfied() && installed_only)
+ continue;
+
+ Pattern::constPtr pattern = asKind<Pattern>(it->resolvable());
+ cout << asXML(*pattern, it->isSatisfied()) << endl;
+ }
+
+ cout << "</pattern-list>" << endl;
+}
+
+static void list_pattern_table(Zypper & zypper)
{
MIL << "Going to list patterns." << std::endl;
@@ -365,11 +388,19 @@
th << _("Repository") << _("Dependency");
tbl << th;
+ bool installed_only = zypper.cOpts().count("installed-only");
+ bool notinst_only = zypper.cOpts().count("uninstalled-only");
+
ResPool::byKind_iterator
it = God->pool().byKindBegin(ResKind::pattern),
e = God->pool().byKindEnd(ResKind::pattern);
for (; it != e; ++it )
{
+ if (it->isSatisfied() && notinst_only)
+ continue;
+ else if (!it->isSatisfied() && installed_only)
+ continue;
+
Pattern::constPtr pattern = asKind<Pattern>(it->resolvable());
TableRow tr;
@@ -391,6 +422,14 @@
cout << tbl;
}
+void list_patterns(Zypper & zypper)
+{
+ if (zypper.out().type() == Out::TYPE_XML)
+ list_patterns_xml(zypper);
+ else
+ list_pattern_table(zypper);
+}
+
void list_packages(Zypper & zypper)
{
MIL << "Going to list packages." << std::endl;
@@ -461,7 +500,29 @@
cout << tbl;
}
-void list_products(Zypper & zypper)
+static void list_products_xml(Zypper & zypper)
+{
+ bool installed_only = zypper.cOpts().count("installed-only");
+ bool notinst_only = zypper.cOpts().count("uninstalled-only");
+
+ cout << "<product-list>" << endl;
+ ResPool::byKind_iterator
+ it = God->pool().byKindBegin(ResKind::product),
+ e = God->pool().byKindEnd(ResKind::product);
+ for (; it != e; ++it )
+ {
+ if (it->status().isInstalled() && notinst_only)
+ continue;
+ else if (!it->status().isInstalled() && installed_only)
+ continue;
+
+ Product::constPtr product = asKind<Product>(it->resolvable());
+ cout << asXML(*product, it->status().isInstalled()) << endl;
+ }
+ cout << "</product-list>" << endl;
+}
+
+static void list_product_table(Zypper & zypper)
{
MIL << "Going to list packages." << std::endl;
@@ -516,6 +577,14 @@
cout << tbl;
}
+void list_products(Zypper & zypper)
+{
+ if (zypper.out().type() == Out::TYPE_XML)
+ list_products_xml(zypper);
+ else
+ list_product_table(zypper);
+}
+
void list_what_provides(Zypper & zypper, const string & str)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/utils/messages.cc new/zypper-0.12.4/src/utils/messages.cc
--- old/zypper-0.12.4/src/utils/messages.cc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/utils/messages.cc 2008-09-12 15:09:41.000000000 +0200
@@ -69,3 +69,14 @@
s << command_help;
out.info(s.str());
}
+
+// ----------------------------------------------------------------------------
+
+void print_verify_hint(Out & out)
+{
+ out.warning(zypp::str::form(
+ _("You have chosen to ignore a problem with download or installation of a package"
+ " which might lead to broken dependencies of other packages."
+ " It is recommended to run '%s' after the operation has finished."),
+ "zypper verify"));
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/utils/messages.h new/zypper-0.12.4/src/utils/messages.h
--- old/zypper-0.12.4/src/utils/messages.h 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/utils/messages.h 2008-09-12 15:09:41.000000000 +0200
@@ -26,5 +26,7 @@
void print_usage(Out & out, const std::string & command_help);
+void print_verify_hint(Out & out);
+
#endif /*MESSAGES_H_*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/utils/misc.cc new/zypper-0.12.4/src/utils/misc.cc
--- old/zypper-0.12.4/src/utils/misc.cc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/utils/misc.cc 2008-09-12 15:09:41.000000000 +0200
@@ -17,6 +17,8 @@
#include "zypp/parser/xml/XmlEscape.h"
#include "zypp/PoolItem.h"
+#include "zypp/Product.h"
+#include "zypp/Pattern.h"
#include "main.h"
#include "Zypper.h"
@@ -320,3 +322,54 @@
}
return Capability();
}
+
+/**
+ * \todo this is an ugly quick-hack code, let's do something reusable and maintainable in libzypp later
+ */
+// ----------------------------------------------------------------------------
+string asXML(const Product & p, bool is_installed)
+{
+ ostringstream str;
+ str
+ << "";
+ else
+ str
+ << ">" << endl << "<description>" << p.description() << "</description>"
+ << endl << "</product>";
+ return str.str();
+}
+
+string asXML(const Pattern & p, bool is_installed)
+{
+ ostringstream str;
+ str
+ << "";
+ else
+ str
+ << ">" << endl << "<description>" << p.description() << "</description>"
+ << endl << "</pattern>";
+ return str.str();
+}
+
+// ----------------------------------------------------------------------------
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/utils/misc.h new/zypper-0.12.4/src/utils/misc.h
--- old/zypper-0.12.4/src/utils/misc.h 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/utils/misc.h 2008-09-12 15:09:41.000000000 +0200
@@ -25,6 +25,8 @@
{
class PoolItem;
class Resolvable;
+ class Product;
+ class Pattern;
}
@@ -106,4 +108,8 @@
return name.find(".repo") != name.npos;
}
+std::string asXML(const zypp::Product & p, bool is_installed);
+
+std::string asXML(const zypp::Pattern & p, bool is_installed);
+
#endif /*ZYPPER_UTILS_H*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/Zypper.cc new/zypper-0.12.4/src/Zypper.cc
--- old/zypper-0.12.4/src/Zypper.cc 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/Zypper.cc 2008-09-12 15:09:41.000000000 +0200
@@ -1001,10 +1001,10 @@
"Add a repository index service to the system.\n"
"\n"
" Command options:\n"
- "-t, --type <TYPE> Type of repository (%s).\n"
+ "-t, --type <TYPE> Type of the service (%s).\n"
"-d, --disable Add the service as disabled.\n"
"-n, --name Specify descriptive name for the service.\n"
- ), "yast2, rpm-md, plaindir");
+ ), "ris");
break;
}
@@ -2187,12 +2187,28 @@
return;
}
+ // force specific repository type. Validation is done in add_service_by_url()
+ string type = copts.count("type") ? copts["type"].front() : "";
+
// by default, enable the service
if (indeterminate(enabled)) enabled = true;
warn_if_zmd();
- add_service_by_url(*this, url, _arguments[1], "" /** \todo type */, enabled);
+ try
+ {
+ add_service_by_url(*this, url, _arguments[1], type, enabled);
+ }
+ catch (const repo::RepoUnknownTypeException & e)
+ {
+ ZYPP_CAUGHT(e);
+ out().error(e,
+ _("Specified type is not a valid service type:"),
+ str::form(
+ _("See '%s' or '%s' to get a list of known repository types."),
+ "zypper help addservice", "man zypper"));
+ setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
+ }
break;
}
@@ -2343,7 +2359,9 @@
ZYPP_CAUGHT(e);
out().error(e,
_("Specified type is not a valid repository type:"),
- _("See 'zypper -h addrepo' or man zypper to get a list of known repository types."));
+ str::form(
+ _("See '%s' or '%s' to get a list of known repository types."),
+ "zypper help addrepo", "man zypper"));
setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/src/Zypper.h new/zypper-0.12.4/src/Zypper.h
--- old/zypper-0.12.4/src/Zypper.h 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/src/Zypper.h 2008-09-12 15:09:41.000000000 +0200
@@ -97,6 +97,8 @@
, solve_before_commit(true)
, commit_pkgs_total(0)
, commit_pkg_current(0)
+ , seen_verify_hint(false)
+ , action_rpm_download(false)
{}
std::listzypp::RepoInfo repos;
@@ -135,6 +137,9 @@
unsigned int commit_pkgs_total;
unsigned int commit_pkg_current;
+
+ bool seen_verify_hint;
+ bool action_rpm_download;
};
class Zypper : private zypp::base::NonCopyable
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/test/test-cases/refresh-services new/zypper-0.12.4/test/test-cases/refresh-services
--- old/zypper-0.12.4/test/test-cases/refresh-services 1970-01-01 01:00:00.000000000 +0100
+++ new/zypper-0.12.4/test/test-cases/refresh-services 2008-09-12 15:09:41.000000000 +0200
@@ -0,0 +1,8 @@
+- when refreshing a service
+ - if url is empty
+ -
+
+- zypper refs
+ Refresh all services (meaning also repos which don't belong to any service),
+ don't refresh services' repos.
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/VERSION.cmake new/zypper-0.12.4/VERSION.cmake
--- old/zypper-0.12.4/VERSION.cmake 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/VERSION.cmake 2008-09-12 15:09:41.000000000 +0200
@@ -33,5 +33,5 @@
SET(VERSION_MINOR "12")
SET(VERSION_PATCH "4")
-# LAST RELEASED: 0.12.3
+# LAST RELEASED: 0.12.4
#=======
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.12.4/zypper.spec.cmake new/zypper-0.12.4/zypper.spec.cmake
--- old/zypper-0.12.4/zypper.spec.cmake 2008-09-10 18:21:14.000000000 +0200
+++ new/zypper-0.12.4/zypper.spec.cmake 2008-09-12 15:09:41.000000000 +0200
@@ -11,7 +11,7 @@
# norootforbuild
Name: @PACKAGE@
-BuildRequires: libzypp-devel >= 5.9.0 boost-devel >= 1.33.1 gettext-devel >= 0.15 readline-devel >= 5.1
+BuildRequires: libzypp-devel >= 5.10.0 boost-devel >= 1.33.1 gettext-devel >= 0.15 readline-devel >= 5.1
BuildRequires: gcc-c++ >= 4.1 cmake >= 2.4.6
Requires: procps
Recommends: logrotate cron
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org