Hello community,
here is the log from the commit of package zypper
checked in at Wed Aug 15 21:49:26 CEST 2007.
--------
--- zypper/zypper.changes 2007-08-12 22:00:55.000000000 +0200
+++ /mounts/work_src_done/STABLE/zypper/zypper.changes 2007-08-15 20:30:48.000000000 +0200
@@ -1,0 +2,43 @@
+Wed Aug 15 20:13:47 CEST 2007 - jkupec@suse.cz
+
+- providing correct capability for installing a resolvable(#298322)
+ fixed for real this time
+- r6686
+- 0.8.11
+
+-------------------------------------------------------------------
+Tue Aug 14 19:33:57 CEST 2007 - jkupec@suse.cz
+
+- zypper repos --export added for exporting definitions of
+ repositories into a single repo file (FATE #301744)
+- improved zypper install command description in the man (#284725)
+- r6650
+
+-------------------------------------------------------------------
+Tue Aug 14 17:45:12 CEST 2007 - jkupec@suse.cz
+
+- forgotten --catalog alias for --repo option added for rug
+ compatibility (support fo repo numbers as --repo argument still
+ pending)
+- r6645
+
+-------------------------------------------------------------------
+Tue Aug 14 13:28:58 CEST 2007 - tgoettlicher@suse.de
+
+- fixed missing </stream> tag in xml output
+- r6635
+
+-------------------------------------------------------------------
+Mon Aug 13 18:07:38 CEST 2007 - jkupec@suse.cz
+
+- providing correct capability for installing a resolvable(#298322)
+- fixed spaces in a message (#299620)
+- r6638
+
+-------------------------------------------------------------------
+Mon Aug 13 15:47:56 CEST 2007 - tgoettlicher@suse.de
+
+- removed restart message from xml (#298942)
+- r6626
+
+-------------------------------------------------------------------
Old:
----
zypper-0.8.10.tar.bz2
New:
----
zypper-0.8.11.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zypper.spec ++++++
--- /var/tmp/diff_new_pack.C14033/_old 2007-08-15 21:48:34.000000000 +0200
+++ /var/tmp/diff_new_pack.C14033/_new 2007-08-15 21:48:34.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package zypper (Version 0.8.10)
+# spec file for package zypper (Version 0.8.11)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,7 +11,7 @@
# norootforbuild
Name: zypper
-BuildRequires: boost-devel >= 1.33.1 gettext-devel >= 0.15 libzypp-devel >= 3.14.0 readline-devel >= 5.1
+BuildRequires: boost-devel >= 1.33.1 gettext-devel >= 0.15 libzypp-devel >= 3.15.0 readline-devel >= 5.1
BuildRequires: cmake >= 2.4.6 gcc-c++ >= 4.2 pkg-config >= 0.20
Requires: procps
License: GPL v2 or later
@@ -20,9 +20,9 @@
Autoreqprov: on
PreReq: permissions
Summary: Command Line Package Management Using Libzypp
-Version: 0.8.10
+Version: 0.8.11
Release: 1
-Source: zypper-0.8.10.tar.bz2
+Source: zypper-0.8.11.tar.bz2
Prefix: /usr
URL: http://en.opensuse.org/Zypper
Provides: y2pmsh
@@ -97,6 +97,31 @@
%ghost %config(noreplace) %{_var}/log/zypper.log
%changelog
+* Wed Aug 15 2007 - jkupec@suse.cz
+- providing correct capability for installing a resolvable(#298322)
+ fixed for real this time
+- r6686
+- 0.8.11
+* Tue Aug 14 2007 - jkupec@suse.cz
+- zypper repos --export added for exporting definitions of
+ repositories into a single repo file (FATE #301744)
+- improved zypper install command description in the man (#284725)
+- r6650
+* Tue Aug 14 2007 - jkupec@suse.cz
+- forgotten --catalog alias for --repo option added for rug
+ compatibility (support fo repo numbers as --repo argument still
+ pending)
+- r6645
+* Tue Aug 14 2007 - tgoettlicher@suse.de
+- fixed missing </stream> tag in xml output
+- r6635
+* Mon Aug 13 2007 - jkupec@suse.cz
+- providing correct capability for installing a resolvable(#298322)
+- fixed spaces in a message (#299620)
+- r6638
+* Mon Aug 13 2007 - tgoettlicher@suse.de
+- removed restart message from xml (#298942)
+- r6626
* Sun Aug 12 2007 - jkupec@suse.cz
- user-friendly install summary (FATE #302152) - try also verbose
output (-v)
++++++ zypper-0.8.10.tar.bz2 -> zypper-0.8.11.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/.cproject new/zypper-0.8.11/.cproject
--- old/zypper-0.8.10/.cproject 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/.cproject 2007-08-15 20:30:48.000000000 +0200
@@ -75,10 +75,12 @@
</target>
</buildTargets>
</storageModule>
+
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
<pathentry excluding="src/" kind="src" path=""/>
<pathentry kind="src" path="src"/>
<pathentry kind="out" path=""/>
+<pathentry kind="out" path="_build"/>
<pathentry kind="out" path="src"/>
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
</storageModule>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/doc/zypper.8 new/zypper-0.8.11/doc/zypper.8
--- old/zypper-0.8.10/doc/zypper.8 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/doc/zypper.8 2007-08-15 20:30:48.000000000 +0200
@@ -47,15 +47,19 @@
Displays full info for the specified packages.
.TP
-.B install (in) <capability> ...
-Install resolvables.
+.B install (in) [options] <capability> ...
+Install or update resolvables.
Capability is: NAME, or "NAME[OP<EDITION>]", where OP is < <= = >= > and
EDITION is VERSION[-RELEASE], for example: zypper=0.8.8-2.
Names are not only package names but any symbols provided by packages:
/bin/vi, libcurl.so.3, perl(Time::ParseDate). Just remember to quote to protect the
-special characters from the shell.
+special characters from the shell, for example: zypper\>0.8.10 or 'zypper>0.8.10'
+
+If EDITION is not specified, the newest available version will be installed.
+This also means that if the package is already installed and newer versions
+are available, it will get upgraded to the newest one.
.TP
\fI\-r, \-\-repo\fR <alias>
@@ -115,7 +119,10 @@
.TP
.B update (up) [options]
-Update all installed resolvables with newer versions, where applicable.
+Update all installed resolvables with newer versions, where applicable. To
+update individual packages, use zypper install <name> (see documentation of
+the install command for details).
+
.TP
\fI\-t, -\-type\fR
Type of resolvable (default: patch)
@@ -251,9 +258,13 @@
.B repos (lr)
List all defined repositories.
.IP
-Following data are printed for each source found: Enabled (whether the source is enabled), Refresh (whether autorefresh is enabled for the source), Type (YaST, YUM, ...), Name, and URI.
-.IP
-rug compatibility mode: if \fI-r\fR global option is set, zypper doesn't include 'Enabled' and 'Refresh' columns and prints rug's 'Status' column with values "Active" or "Disabled" instead.
+Following data are printed for each repository found: Enabled (whether the repository is enabled), Refresh (whether autorefresh is enabled for the repository), Type (YaST, YUM, Plaindir), Name, and URI.
+.TP
+.I \-e, \-\-export
+This option causes zypper to write repository definition of all defined
+repositories into a single file in repo file format.
+If '\-' is specified instead of a file name,
+the repositories will be written to the standard output.
.TP
.B renamerepo (nr) <alias> <new-alias>
@@ -318,7 +329,7 @@
Specifies table style to use. Table style is identified by an integer number. TODO
.TP
.I \-r, \-\-rug\-compatible
-Turns on rug compatibility. See compatibility notes next to affected commands.
+Turns on rug compatibility. See section COMPATIBILITY WITH RUG for details.
.TP
.I \-n, \-\-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. The behaviour of this option is somewhat different than that of options like '--yes', since zypper can answer different answers to different questions. The answers also depend on other options like '--no-gpg-checks'.
@@ -381,8 +392,9 @@
.SH "COMPATIBILITY WITH RUG"
.LP
zypper is designed to be compatible with rug, which is a command\-line interface to the ZENworks Linux Management (ZLM) agent. Compared to rug, zypper does not need the ZLM daemon to run, and is intented to provide more and improved functionality. Following is a list of zypper-rug command aliases, supported rug command line options, and compatibility notes. See also compatibility notes in descriptions of zypper commands.
+.LP
+To enable rug compatible behaviour, use the \-r or \-\-rug\-compatible global option with each command.
-.LP
.SS Service Management Commands
.LP
ZENworks distinguishes services and catalogs. A service is
@@ -403,6 +415,10 @@
.I rug service-list (sl)
zypper repos (lr)
+.IP
+ zypper doesn't include 'Enabled' and 'Refresh' columns and prints rug's 'Status' column with values "Active" or "Disabled" instead.
+
+
.SS Package Management Commands
.TP
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/package/zypper.changes new/zypper-0.8.11/package/zypper.changes
--- old/zypper-0.8.10/package/zypper.changes 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/package/zypper.changes 2007-08-15 20:30:48.000000000 +0200
@@ -1,4 +1,47 @@
-------------------------------------------------------------------
+Wed Aug 15 20:13:47 CEST 2007 - jkupec@suse.cz
+
+- providing correct capability for installing a resolvable(#298322)
+ fixed for real this time
+- r6686
+- 0.8.11
+
+-------------------------------------------------------------------
+Tue Aug 14 19:33:57 CEST 2007 - jkupec@suse.cz
+
+- zypper repos --export added for exporting definitions of
+ repositories into a single repo file (FATE #301744)
+- improved zypper install command description in the man (#284725)
+- r6650
+
+-------------------------------------------------------------------
+Tue Aug 14 17:45:12 CEST 2007 - jkupec@suse.cz
+
+- forgotten --catalog alias for --repo option added for rug
+ compatibility (support fo repo numbers as --repo argument still
+ pending)
+- r6645
+
+-------------------------------------------------------------------
+Tue Aug 14 13:28:58 CEST 2007 - tgoettlicher@suse.de
+
+- fixed missing </stream> tag in xml output
+- r6635
+
+-------------------------------------------------------------------
+Mon Aug 13 18:07:38 CEST 2007 - jkupec@suse.cz
+
+- providing correct capability for installing a resolvable(#298322)
+- fixed spaces in a message (#299620)
+- r6638
+
+-------------------------------------------------------------------
+Mon Aug 13 15:47:56 CEST 2007 - tgoettlicher@suse.de
+
+- removed restart message from xml (#298942)
+- r6626
+
+-------------------------------------------------------------------
Sun Aug 12 16:27:41 CEST 2007 - jkupec@suse.cz
- user-friendly install summary (FATE #302152) - try also verbose
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/src/zypper.cc new/zypper-0.8.11/src/zypper.cc
--- old/zypper-0.8.10/src/zypper.cc 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/src/zypper.cc 2007-08-15 20:30:48.000000000 +0200
@@ -21,7 +21,6 @@
#include
#include
-#include
#include
#include "zypper.h"
@@ -48,6 +47,7 @@
Settings gSettings;
parsed_opts gopts; // global options
parsed_opts copts; // command options
+ZypperCommand command(ZypperCommand::NONE);
ostream no_stream(NULL);
@@ -83,7 +83,7 @@
* \returns ZypperCommand object representing the command or ZypperCommand::NONE
* if an unknown command has been given.
*/
-ZypperCommand process_globals(int argc, char **argv)
+void process_globals(int argc, char **argv)
{
static struct option global_options[] = {
{"help", no_argument, 0, 'h'},
@@ -104,7 +104,7 @@
// parse global options
gopts = parse_options (argc, argv, global_options);
if (gopts.count("_unknown"))
- return ZypperCommand::NONE;
+ return;
static string help_global_options = _(" Options:\n"
"\t--help, -h\t\tHelp.\n"
@@ -199,7 +199,6 @@
// get command
- ZypperCommand command(ZypperCommand::NONE_e);
try
{
if (optind < argc)
@@ -230,13 +229,10 @@
else
cerr << _("Try -h for help.") << endl;
}
-
- //cerr_vv << "COMMAND: " << command << endl;
- return command;
}
/// process one command from the OS shell or the zypper shell
-int one_command(const ZypperCommand & command, int argc, char **argv)
+int one_command(int argc, char **argv)
{
// === command-specific options ===
@@ -362,6 +358,7 @@
}
else if (command == ZypperCommand::LIST_REPOS) {
static struct option service_list_options[] = {
+ {"export", required_argument, 0, 'e'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@@ -371,7 +368,8 @@
"\n"
"List all defined repositories.\n"
"\n"
- "This command has no additional options.\n"
+ " Command options:\n"
+ "-e, --export Export all defined repositories as a single local .repo file\n"
);
}
else if (command == ZypperCommand::REMOVE_REPO) {
@@ -716,25 +714,23 @@
// here come commands that need the lock
try {
- if (command == ZypperCommand::LIST_REPOS)
- zypp_readonly_hack::IWantIt (); // #247001
+// if (command == ZypperCommand::LIST_REPOS)
+// zypp_readonly_hack::IWantIt (); // #247001
God = zypp::getZYpp();
}
catch (Exception & excpt_r) {
ZYPP_CAUGHT (excpt_r);
ERR << "A ZYpp transaction is already in progress." << endl;
+ string msg = _("A ZYpp transaction is already in progress."
+ " This means, there is another application using libzypp library for"
+ " package management running. All such applications must be closed before"
+ " using this command.");
- if ( gSettings.machine_readable )
- cout << "" << endl;
- else
- cerr << _("A ZYpp transaction is already in progress."
- "This means, there is another application using libzypp library for"
- "package management running. All such applications must be closed before"
- "using this command.") << endl;
+ if ( gSettings.machine_readable )
+ cout << "" << endl;
+ else
+ cerr << msg << endl;
return ZYPPER_EXIT_ERR_ZYPP;
}
@@ -1116,8 +1112,6 @@
// --------------------------( search )-------------------------------------
- // TODO -c, --catalog option
-
else if (command == ZypperCommand::SEARCH)
{
ZyppSearchOptions options;
@@ -1395,11 +1389,12 @@
/// process one command from the OS shell or the zypper shell
// catch unexpected exceptions and tell the user to report a bug (#224216)
-int safe_one_command(const ZypperCommand & command, int argc, char **argv)
+int safe_one_command(int argc, char **argv)
{
int ret = ZYPPER_EXIT_ERR_BUG;
try {
- ret = one_command (command, argc, argv);
+ ret = one_command (argc, argv);
+ command = ZypperCommand::NONE;
}
catch (const Exception & ex) {
ZYPP_CAUGHT(ex);
@@ -1408,6 +1403,10 @@
cerr << ex.asUserString() << endl;
report_a_bug(cerr);
}
+
+ if ( gSettings.machine_readable )
+ cout << "</stream>" << endl;
+
return ret;
}
@@ -1488,7 +1487,7 @@
else if (command == ZypperCommand::SHELL)
cout << _("You already are running zypper's shell.") << endl;
else
- safe_one_command (command, sh_argc, sh_argv);
+ safe_one_command (sh_argc, sh_argv);
}
catch (Exception & e)
{
@@ -1511,9 +1510,6 @@
}
} say_goodbye __attribute__ ((__unused__));
- if ( gSettings.machine_readable )
- cout << "</stream>" << endl;
-
// set locale
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
@@ -1528,7 +1524,7 @@
MIL << "Hi, me zypper " VERSION " built " << __DATE__ << " " << __TIME__ << endl;
// parse global options and the command
- ZypperCommand command = process_globals (argc, argv);
+ process_globals (argc, argv);
switch(command.toEnum())
{
case ZypperCommand::SHELL_e:
@@ -1539,7 +1535,7 @@
return ZYPPER_EXIT_ERR_SYNTAX;
default:
- return safe_one_command(command, argc, argv);
+ return safe_one_command(argc, argv);
}
cerr_v << "This line should never be reached." << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/src/zypper.h new/zypper-0.8.11/src/zypper.h
--- old/zypper-0.8.10/src/zypper.h 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/src/zypper.h 2007-08-15 20:30:48.000000000 +0200
@@ -13,6 +13,7 @@
#include
#include
+#include "zypper-command.h"
#define ZYPP_CHECKPATCHES_LOG "/var/log/zypper.log"
#undef ZYPP_BASE_LOGGER_LOGGROUP
@@ -129,6 +130,7 @@
extern RuntimeData gData;
extern Settings gSettings;
extern std::ostream no_stream;
+extern ZypperCommand command;
#define VERBOSITY_NORMAL 0
#define VERBOSITY_MEDIUM 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/src/zypper-info.cc new/zypper-0.8.11/src/zypper-info.cc
--- old/zypper-0.8.10/src/zypper-info.cc 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/src/zypper-info.cc 2007-08-15 20:30:48.000000000 +0200
@@ -160,7 +160,7 @@
cout << _("Reboot Required: ") << (patch->reboot_needed() ? _("Yes") : _("No")) << endl;
if (!gSettings.is_rug_compatible)
- cout << _("Package Manager Restart Required");
+ cout << _("Package Manager Restart Required") << ": ";
else
cout << _("Restart Required: ");
cout << (patch->affects_pkg_manager() ? _("Yes") : _("No")) << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/src/zypper-misc.cc new/zypper-0.8.11/src/zypper-misc.cc
--- old/zypper-0.8.10/src/zypper-misc.cc 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/src/zypper-misc.cc 2007-08-15 20:30:48.000000000 +0200
@@ -3,6 +3,7 @@
#include
#include
+#include
#include
#include
#include
@@ -160,6 +161,52 @@
return parser.escape(text);
}
+/**
+ * Stops iterations on first item and stores edition of the found item.
+ *
+ * If no item has been found, the \ref found variable is set to false.
+ */
+struct VersionGetter
+{
+ Edition edition;
+ bool found;
+
+ VersionGetter() : found(false) {}
+
+ bool operator()(const zypp::PoolItem& item)
+ {
+ edition = item.resolvable()->edition();
+ found = true;
+ return false; // don't iterate further
+ }
+};
+
+/**
+ * Stops iterations on first item having revision newer than edition passed in
+ * contructor. Stores the edition of the found item.
+ *
+ * If no item has been found, the \ref found variable is set to false.
+ */
+struct NewerVersionGetter
+{
+ const Edition & old_edition;
+ Edition edition;
+ bool found;
+
+ NewerVersionGetter(const Edition & edition) : old_edition(edition), found(false) {}
+
+ bool operator()(const zypp::PoolItem& item)
+ {
+ if (item.resolvable()->edition() > old_edition)
+ {
+ edition = item.resolvable()->edition();
+ found = true;
+ return false; // don't iterate further
+ }
+
+ return true;
+ }
+};
// on error print a message and return noCap
Capability safe_parse_cap (const ResObject::Kind &kind, const string & capstr) {
@@ -181,6 +228,40 @@
cout_vv << "new capstr: " << new_capstr << endl;
}
}
+ // if we are about to install stuff and
+ // if this is not a candidate for a versioned capability, take it like
+ // a package name and check if it is already installed
+ else if (command == ZypperCommand::INSTALL)
+ {
+ using namespace zypp::functor;
+ using namespace zypp::resfilter;
+
+ // get the installed version
+ VersionGetter vg;
+ invokeOnEach(
+ God->pool().byNameBegin(capstr),
+ God->pool().byNameEnd(capstr),
+ chain(ByKind(kind),ByInstalled()),
+ functorRef (vg));
+ // installed found
+ if (vg.found)
+ {
+ // check for newer version of that resolvable
+ NewerVersionGetter nvg(vg.edition);
+ invokeOnEach(
+ God->pool().byNameBegin(capstr),
+ God->pool().byNameEnd(capstr),
+ chain(resfilter::ByKind(kind),not_c(ByInstalled())),
+ functorRef (nvg));
+ // newer version found
+ if (nvg.found)
+ {
+ cout_vv << "installed resolvable named " << capstr
+ << " found, changing capability to " << new_capstr << endl;
+ new_capstr = capstr + ">" + vg.edition.asString();
+ }
+ }
+ }
cap = CapFactory().parse (kind, new_capstr);
}
@@ -1419,11 +1500,7 @@
}
else if (retv == ZYPPER_EXIT_INF_RESTART_NEEDED)
{
- if (gSettings.machine_readable)
- cout << "" << endl;
- else
+ if (!gSettings.machine_readable)
cout << _("WARNING: One of installed patches affects the package"
" manager itself, thus it requires restart before executing"
" next operations.") << endl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/src/zypper-search.h new/zypper-0.8.11/src/zypper-search.h
--- old/zypper-0.8.10/src/zypper-search.h 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/src/zypper-search.h 2007-08-15 20:30:48.000000000 +0200
@@ -18,6 +18,7 @@
#include
#include "zypper.h"
+#include "zypper-getopt.h"
#include "zypper-tabulator.h"
extern Settings gSettings;
@@ -322,7 +323,9 @@
DuplicateFilter(IdCache & idcache) : _idcache(&idcache) {}
bool operator()(const zypp::PoolItem & pi) const {
- return !(pi.status().isInstalled() && _idcache->contains(pi));
+ //! \todo filter out those language resolvables
+ return !(pi.status().isInstalled()
+ && (_idcache->contains(pi) || copts.count("repo")));
}
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/src/zypper-sources.cc new/zypper-0.8.11/src/zypper-sources.cc
--- old/zypper-0.8.10/src/zypper-sources.cc 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/src/zypper-sources.cc 2007-08-15 20:30:48.000000000 +0200
@@ -131,7 +131,13 @@
{
RepoManager manager;
- string specific_repo = copts.count( "repo" ) ? copts["repo"].front() : "";
+ string specific_repo = copts.count("repo") ? copts["repo"].front() : "";
+
+ // rug compatibility
+ //! \todo support repo #
+ if (specific_repo.empty())
+ specific_repo = copts.count("catalog") ? copts["catalog"].front() : "";
+
if (!specific_repo.empty())
{
MIL << "--repo set to '" << specific_repo
@@ -290,6 +296,18 @@
// ----------------------------------------------------------------------------
+void print_repos_to(const std::listzypp::RepoInfo &repos, ostream & out)
+{
+ for (std::list<RepoInfo>::const_iterator it = repos.begin();
+ it != repos.end(); ++it)
+ {
+ it->dumpRepoOn(out);
+ out << endl;
+ }
+}
+
+// ----------------------------------------------------------------------------
+
void list_repos()
{
RepoManager manager;
@@ -307,7 +325,40 @@
exit(ZYPPER_EXIT_ERR_ZYPP);
}
- print_repo_list(repos);
+ // export to file or stdout in repo file format
+ if (copts.count("export"))
+ {
+ string filename_str = copts["export"].front();
+ if (filename_str == "-")
+ {
+ print_repos_to(repos, cout);
+ }
+ else
+ {
+ if (filename_str.rfind(".repo") == string::npos)
+ filename_str += ".repo";
+
+ Pathname file(filename_str);
+ std::ofstream stream(file.c_str());
+ if (!stream)
+ {
+ cerr << format(_("Can't open %s for writing. Maybe you don't have write permissions?"))
+ % file.asString() << endl;
+ exit(ZYPPER_EXIT_ERR_INVALID_ARGS);
+ }
+ else
+ {
+ print_repos_to(repos, stream);
+ cout << format(
+ _("Repositories have been successfully exported to %s."))
+ % (file.absolute() ? file.asString() : file.asString().substr(2))
+ << endl;
+ }
+ }
+ }
+ // print repo list as table
+ else
+ print_repo_list(repos);
}
// ----------------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/VERSION.cmake new/zypper-0.8.11/VERSION.cmake
--- old/zypper-0.8.10/VERSION.cmake 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/VERSION.cmake 2007-08-15 20:30:48.000000000 +0200
@@ -20,4 +20,4 @@
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "8")
-SET(VERSION_PATCH "10")
+SET(VERSION_PATCH "11")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/zypper-0.8.10/zypper.spec.cmake new/zypper-0.8.11/zypper.spec.cmake
--- old/zypper-0.8.10/zypper.spec.cmake 2007-08-12 22:00:54.000000000 +0200
+++ new/zypper-0.8.11/zypper.spec.cmake 2007-08-15 20:30:48.000000000 +0200
@@ -11,7 +11,7 @@
# norootforbuild
Name: @PACKAGE@
-BuildRequires: libzypp-devel >= 3.14.0 boost-devel >= 1.33.1 gettext-devel >= 0.15 readline-devel >= 5.1
+BuildRequires: libzypp-devel >= 3.15.0 boost-devel >= 1.33.1 gettext-devel >= 0.15 readline-devel >= 5.1
BuildRequires: gcc-c++ >= 4.2 cmake >= 2.4.6 pkg-config >= 0.20
Requires: procps
License: GPL
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org