Hello community,
here is the log from the commit of package zypper
checked in at Thu Oct 11 02:06:24 CEST 2007.
--------
--- zypper/zypper.changes 2007-09-28 15:38:02.000000000 +0200
+++ /mounts/work_src_done/STABLE/zypper/zypper.changes 2007-10-10 15:44:32.373793000 +0200
@@ -2 +2 @@
-Fri Sep 28 15:10:35 CEST 2007 - ma@suse.de
+Mon Oct 8 17:40:21 CEST 2007 - jkupec@suse.cz
@@ -4,6 +4,3 @@
-- Attempt to fix memory corruption in zypper (#305196).
- The memory corruption occurres on ppc only, and only if compiled
- with -O2. Although it is likely to be a gcc bug, the current code
- seems to be less affected.
-- r7405
-- 0.8.24
+- fixed compilation with gcc 4.3
+- r7468
+- 0.9.0
@@ -12 +9 @@
-Tue Sep 25 13:34:59 CEST 2007 - jkupec@suse.cz
+Mon Oct 8 14:34:25 CEST 2007 - jkupec@suse.cz
@@ -14,2 +11,28 @@
-- german translation update
-- r7362
+- missing -y option added to the update command (rug-compatibility)
+ (#331632)
+- r7465
+
+-------------------------------------------------------------------
+Sat Oct 6 18:20:01 CEST 2007 - jkupec@suse.cz
+
+- correctly translate the command list (help text) (#327487)
+- r7460
+
+-------------------------------------------------------------------
+Sat Oct 6 12:16:37 CEST 2007 - jkupec@suse.cz
+
+- don't check if to refresh cd/dvd repos even on user request
+ unless forced
+- r7449
+
+-------------------------------------------------------------------
+Tue Oct 2 09:58:31 CEST 2007 - mvidner@suse.cz
+
+- Fixed misalignment in localized tables (#328918).
+
+-------------------------------------------------------------------
+Tue Sep 25 17:59:22 CEST 2007 - jkupec@suse.cz
+
+- report malformed URLs correctly in zypper addrepo (#325660)
+- make compiler happy about /* withing comments
+- r7374
Old:
----
zypper-0.8.24.tar.bz2
New:
----
zypper-0.9.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zypper.spec ++++++
--- /var/tmp/diff_new_pack.jf4568/_old 2007-10-11 02:06:16.000000000 +0200
+++ /var/tmp/diff_new_pack.jf4568/_new 2007-10-11 02:06:16.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package zypper (Version 0.8.24)
+# spec file for package zypper (Version 0.9.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -20,9 +20,9 @@
AutoReqProv: on
PreReq: permissions
Summary: Command Line Package Management Using Libzypp
-Version: 0.8.24
+Version: 0.9.0
Release: 1
-Source: zypper-0.8.24.tar.bz2
+Source: zypper-0.9.0.tar.bz2
Prefix: /usr
Url: http://en.opensuse.org/Zypper
Provides: y2pmsh
@@ -96,16 +96,27 @@
# it from being erased by rpm -e
%ghost %config(noreplace) %{_var}/log/zypper.log
%changelog
-* Fri Sep 28 2007 - ma@suse.de
-- Attempt to fix memory corruption in zypper (#305196).
- The memory corruption occurres on ppc only, and only if compiled
- with -O2. Although it is likely to be a gcc bug, the current code
- seems to be less affected.
-- r7405
-- 0.8.24
+* Mon Oct 08 2007 - jkupec@suse.cz
+- fixed compilation with gcc 4.3
+- r7468
+- 0.9.0
+* Mon Oct 08 2007 - jkupec@suse.cz
+- missing -y option added to the update command (rug-compatibility)
+ (#331632)
+- r7465
+* Sat Oct 06 2007 - jkupec@suse.cz
+- correctly translate the command list (help text) (#327487)
+- r7460
+* Sat Oct 06 2007 - jkupec@suse.cz
+- don't check if to refresh cd/dvd repos even on user request
+ unless forced
+- r7449
+* Tue Oct 02 2007 - mvidner@suse.cz
+- Fixed misalignment in localized tables (#328918).
* Tue Sep 25 2007 - jkupec@suse.cz
-- german translation update
-- r7362
+- report malformed URLs correctly in zypper addrepo (#325660)
+- make compiler happy about /* withing comments
+- r7374
* Fri Sep 21 2007 - jkupec@suse.cz
- fix zypper refresh exit status (#326694)
- translations update
++++++ zypper-0.8.24.tar.bz2 -> zypper-0.9.0.tar.bz2 ++++++
++++ 2556 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/CMakeLists.txt new/zypper-0.9.0/CMakeLists.txt
--- old/zypper-0.8.24/CMakeLists.txt 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/CMakeLists.txt 2007-10-10 15:33:42.000000000 +0200
@@ -6,8 +6,8 @@
SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" )
ADD_DEFINITIONS( -DVERSION=\\\"${VERSION}\\\" )
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Woverloaded-virtual" )
-SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Woverloaded-virtual -fstack-protector" )
+SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -Wall -fstack-protector" )
# usr INSTALL_PREFIX
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/doc/devel-checklist new/zypper-0.9.0/doc/devel-checklist
--- old/zypper-0.8.24/doc/devel-checklist 1970-01-01 01:00:00.000000000 +0100
+++ new/zypper-0.9.0/doc/devel-checklist 2007-10-10 15:33:42.000000000 +0200
@@ -0,0 +1,9 @@
+Things to check when adding/changing a feature:
+
+( ) use cout_n, cout_v, cout_vv, cerr_v, cerr_vv macros for output
+( ) mark *_n and *_v output for translation
+( ) use DBG, MIL, WAR, ERR macros for logging to zypper.log (not translated)
+( ) support --non-interactive mode (for scripting) if the feature requires
+ interaction
+( ) check if documentation needs update (--help texts, man page, wiki)
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/doc/zypper.8 new/zypper-0.9.0/doc/zypper.8
--- old/zypper-0.8.24/doc/zypper.8 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/doc/zypper.8 2007-10-10 15:33:42.000000000 +0200
@@ -1,4 +1,4 @@
-.TH "zypper" "8" "0.7.0" "zypper" "System Tools"
+.TH "zypper" "8" "0.9.0" "zypper" "System Tools"
.SH "SYNTAX"
.LP
zypper [\fI\-\-global\-options\fR] <\fBcommand\fR> [\fI\-\-command\-options\fR] [\fBcommand-arguments\fR]
@@ -79,7 +79,7 @@
.I \-f, \-\-force
Install even if the item is already installed (reinstall)
.TP
-.I \-n, \-\-capability
+.I \-C, \-\-capability
Select resolvables by capabilities.
.TP
.I \-l, \-\-auto\-agree\-with\-licenses
@@ -129,7 +129,7 @@
.I \-n, \-\-name
Select resolvables by their name (default).
.TP
-.I \-n, \-\-capability
+.I \-C, \-\-capability
Select resolvables by capabilities.
.TP
.I \-\-debug\-solver
@@ -383,8 +383,10 @@
.LP
The file
.B /etc/zypp/locks
-can contain a list of packages to be locked. These will not be updated
-or removed by the solver.
+can contain a list of packages to be locked. Installed packages which match one
+of the items in this list will not be updated or removed by the solver.
+Similarly, those matching packages which have not yet been installed, will not be
+considered for installation.
Empty lines and lines beginning with \fB#\fR are ignored. Each line is of the form
"\fIPATTERN \fR[ \fIOP EDITION \fR]"
@@ -551,4 +553,3 @@
.SH "SEE ALSO"
.LP
rug(1), YaST2(8)
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/package/zypper.changes new/zypper-0.9.0/package/zypper.changes
--- old/zypper-0.8.24/package/zypper.changes 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/package/zypper.changes 2007-10-10 15:33:42.000000000 +0200
@@ -1,18 +1,41 @@
-------------------------------------------------------------------
-Fri Sep 28 15:10:35 CEST 2007 - ma@suse.de
+Mon Oct 8 17:40:21 CEST 2007 - jkupec@suse.cz
-- Attempt to fix memory corruption in zypper (#305196).
- The memory corruption occurres on ppc only, and only if compiled
- with -O2. Although it is likely to be a gcc bug, the current code
- seems to be less affected.
-- r7405
-- 0.8.24
+- fixed compilation with gcc 4.3
+- r7468
+- 0.9.0
-------------------------------------------------------------------
-Tue Sep 25 13:34:59 CEST 2007 - jkupec@suse.cz
+Mon Oct 8 14:34:25 CEST 2007 - jkupec@suse.cz
-- german translation update
-- r7362
+- missing -y option added to the update command (rug-compatibility)
+ (#331632)
+- r7465
+
+-------------------------------------------------------------------
+Sat Oct 6 18:20:01 CEST 2007 - jkupec@suse.cz
+
+- correctly translate the command list (help text) (#327487)
+- r7460
+
+-------------------------------------------------------------------
+Sat Oct 6 12:16:37 CEST 2007 - jkupec@suse.cz
+
+- don't check if to refresh cd/dvd repos even on user request
+ unless forced
+- r7449
+
+-------------------------------------------------------------------
+Tue Oct 2 09:58:31 CEST 2007 - mvidner@suse.cz
+
+- Fixed misalignment in localized tables (#328918).
+
+-------------------------------------------------------------------
+Tue Sep 25 17:59:22 CEST 2007 - jkupec@suse.cz
+
+- report malformed URLs correctly in zypper addrepo (#325660)
+- make compiler happy about /* withing comments
+- r7374
-------------------------------------------------------------------
Fri Sep 21 16:45:18 CEST 2007 - jkupec@suse.cz
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypp-checkpatches.cc new/zypper-0.9.0/src/zypp-checkpatches.cc
--- old/zypper-0.8.24/src/zypp-checkpatches.cc 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypp-checkpatches.cc 2007-10-10 15:33:42.000000000 +0200
@@ -15,7 +15,6 @@
#include <fstream>
#include <sstream>
-#include
#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper.cc new/zypper-0.9.0/src/zypper.cc
--- old/zypper-0.8.24/src/zypper.cc 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper.cc 2007-10-10 15:33:42.000000000 +0200
@@ -61,48 +61,7 @@
DigestCallbacks digest_callbacks;
-/**
- * Constructor wrapper catching exceptions,
- * returning an empty one on error.
- */
-Url make_url (const string & url_s) {
- Url u;
-
- try {
- u = Url( (url_s[0] == '/') ? string("dir:") + url_s : url_s );
- }
- catch ( const Exception & excpt_r ) {
- ZYPP_CAUGHT( excpt_r );
- cerr << _("Given URL is invalid.") << endl;
- cerr << excpt_r.asUserString() << endl;
- }
- return u;
-}
-
bool ghelp = false;
- static string help_commands = _(
- " Commands:\n"
- "\thelp, ?\t\t\tHelp\n"
- "\tshell, sh\t\tAccept multiple commands at once\n"
- "\tinstall, in\t\tInstall packages or resolvables\n"
- "\tremove, rm\t\tRemove packages or resolvables\n"
- "\tsearch, se\t\tSearch for packages matching a pattern\n"
- "\trepos, lr\t\tList all defined repositories.\n"
- "\taddrepo, ar\t\tAdd a new repository\n"
- "\tremoverepo, rr\t\tRemove specified repository\n"
- "\trenamerepo, nr\t\tRename specified repository\n"
- "\tmodifyrepo, mr\t\tModify specified repository\n"
- "\trefresh, ref\t\tRefresh all repositories\n"
- "\tpatch-check, pchk\tCheck for patches\n"
- "\tpatches, pch\t\tList patches\n"
- "\tlist-updates, lu\tList updates\n"
- "\txml-updates, xu\t\tList updates and patches in xml format\n"
- "\tupdate, up\t\tUpdate installed resolvables with newer versions.\n"
- "\tinfo, if\t\tShow full information for packages\n"
- "\tpatch-info\t\tShow full information for patches\n"
- "\tsource-install, si\tInstall a source package\n"
- "");
-
/*
* parses global options, returns the command
@@ -201,8 +160,30 @@
cout << endl;
}
- // get command
+ static string help_commands = _(
+ " Commands:\n"
+ "\thelp, ?\t\t\tHelp\n"
+ "\tshell, sh\t\tAccept multiple commands at once\n"
+ "\tinstall, in\t\tInstall packages or resolvables\n"
+ "\tremove, rm\t\tRemove packages or resolvables\n"
+ "\tsearch, se\t\tSearch for packages matching a pattern\n"
+ "\trepos, lr\t\tList all defined repositories.\n"
+ "\taddrepo, ar\t\tAdd a new repository\n"
+ "\tremoverepo, rr\t\tRemove specified repository\n"
+ "\trenamerepo, nr\t\tRename specified repository\n"
+ "\tmodifyrepo, mr\t\tModify specified repository\n"
+ "\trefresh, ref\t\tRefresh all repositories\n"
+ "\tpatch-check, pchk\tCheck for patches\n"
+ "\tpatches, pch\t\tList patches\n"
+ "\tlist-updates, lu\tList updates\n"
+ "\txml-updates, xu\t\tList updates and patches in xml format\n"
+ "\tupdate, up\t\tUpdate installed resolvables with newer versions.\n"
+ "\tinfo, if\t\tShow full information for packages\n"
+ "\tpatch-info\t\tShow full information for patches\n"
+ "\tsource-install, si\tInstall a source package\n"
+ "");
+ // get command
try
{
if (optind < argc)
@@ -267,7 +248,8 @@
if (command == ZypperCommand::HELP)
{
- cout << help_commands;
+ cout << _("Type 'zypper help' to get a list of global options and commands.") << endl;
+ cout << _("Type 'zypper help <command>' to get a command-specific help.") << endl;
}
else if (command == ZypperCommand::INSTALL) {
static struct option install_options[] = {
@@ -289,8 +271,6 @@
{0, 0, 0, 0}
};
specific_options = install_options;
- //! \todo document --capability and --force after 10.3 is out
- // "-f, --force Install even if the item is already installed (reinstall)\n"
specific_help = _(
// TranslatorExplanation don't translate the resolvable types
// (package, patch, pattern, product) or at least leave also their
@@ -304,9 +284,11 @@
"-r, --repo <alias> Install resolvables only from repository specified by alias.\n"
"-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: package)\n"
"-n, --name Select resolvables by plain name, not by capability\n"
+ "-C, --capability Select resolvables by capability\n"
"-l, --auto-agree-with-licenses Automatically say 'yes' to third party license confirmation prompt.\n"
" See 'man zypper' for more details.\n"
" --debug-solver Create solver test case for debugging\n"
+ "-f, --force Install even if the item is already installed (reinstall)\n"
);
}
else if (command == ZypperCommand::REMOVE) {
@@ -325,7 +307,6 @@
{0, 0, 0, 0}
};
specific_options = remove_options;
- //! \todo document --capability after 10.3 is out
specific_help = _(
// TranslatorExplanation don't translate the resolvable types
// (see the install command comment)
@@ -338,6 +319,7 @@
"-r, --repo <alias> Operate only with resolvables from repository specified by alias.\n"
"-t, --type <type> Type of resolvable (package, patch, pattern, product) (default: package)\n"
"-n, --name Select resolvables by plain name, not by capability\n"
+ "-C, --capability Select resolvables by capability\n"
" --debug-solver Create solver test case for debugging\n"
);
}
@@ -504,6 +486,9 @@
// rug compatibility option, we have --repo
{"catalog", required_argument, 0, 'c'},
{"type", required_argument, 0, 't'},
+ // rug compatibility option, we have global --non-interactive
+ // note: rug used this uption only to auto-answer the 'continue with install?' prompt.
+ {"no-confirm", no_argument, 0, 'y'},
{"skip-interactive", no_argument, 0, 0},
{"auto-agree-with-licenses", no_argument, 0, 'l'},
// rug compatibility, we have --auto-agree-with-licenses
@@ -848,28 +833,22 @@
cout_n << specific_help;
return ZYPPER_EXIT_ERR_INVALID_ARGS;
}
-
+
Url url = make_url (arguments[0]);
- if (!url.isValid()) //! \todo error message
+ if (!url.isValid())
return ZYPPER_EXIT_ERR_INVALID_ARGS;
-
- string alias;
- if (arguments.size() > 1)
- alias = arguments[1];
- //! \todo use timestamp as alias, if no alias was given?
- if (alias.empty ())
- alias = url.asString();
-
+
// by default, enable the repo and set autorefresh
if (indeterminate(enabled)) enabled = true;
if (indeterminate(refresh)) refresh = true;
-
+
warn_if_zmd();
-
+
// load gpg keys
cond_init_target ();
-
- return add_repo_by_url(url, alias, type, enabled, refresh);
+
+ return add_repo_by_url(
+ url, arguments[1]/*alias*/, type, enabled, refresh);
}
catch (const repo::RepoUnknownTypeException & e)
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-command.h new/zypper-0.9.0/src/zypper-command.h
--- old/zypper-0.8.24/src/zypper-command.h 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-command.h 2007-10-10 15:33:42.000000000 +0200
@@ -77,7 +77,7 @@
explicit ZypperCommand(const std::string & strval_r);
- const Command toEnum() const { return _command; }
+ Command toEnum() const { return _command; }
ZypperCommand::Command parse(const std::string & strval_r);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper.h new/zypper-0.9.0/src/zypper.h
--- old/zypper-0.8.24/src/zypper.h 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper.h 2007-10-10 15:33:42.000000000 +0200
@@ -1,6 +1,8 @@
#ifndef ZYPPER_H
#define ZYPPER_H
+#include
+
#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-media-callbacks.h new/zypper-0.9.0/src/zypper-media-callbacks.h
--- old/zypper-0.8.24/src/zypper-media-callbacks.h 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-media-callbacks.h 2007-10-10 15:33:42.000000000 +0200
@@ -54,7 +54,7 @@
// You can also have a look at the regular expressions used to check the answer here:
// /usr/lib/locale//LC_MESSAGES/SYS_LC_MESSAGES
std::string request = boost::str(boost::format(
- _("Please insert media [%s] # %d and type 'y' to continue or 'n' to cancel the operation."))
+ _("Please insert medium [%s] #%d and type 'y' to continue or 'n' to cancel the operation."))
% gData.current_repo.name() % mediumNr);
if (read_bool_answer(request, false))
return MediaChangeReport::RETRY;
@@ -64,6 +64,7 @@
// not displaying the error for non-changeable media, it will be displayed
// where it is caught
+ return MediaChangeReport::ABORT;
}
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-misc.cc new/zypper-0.9.0/src/zypper-misc.cc
--- old/zypper-0.8.24/src/zypper-misc.cc 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-misc.cc 2007-10-10 15:33:42.000000000 +0200
@@ -190,7 +190,7 @@
// transform to NAME[ OP <EDITION>] (add spaces)
string new_capstr = capstr;
cout_vv << "capstr: " << capstr << endl;
- int op_pos = capstr.find_first_of("<>=");
+ string::size_type op_pos = capstr.find_first_of("<>=");
if (op_pos != string::npos)
{
new_capstr.insert(op_pos, " ");
@@ -965,7 +965,7 @@
if ( it->status().isNeeded())
{
Patch::constPtr patch = asKind<Patch>(res);
- if (pkg_mgr_available && patch->affects_pkg_manager() ||
+ if ((pkg_mgr_available && patch->affects_pkg_manager()) ||
!pkg_mgr_available )
{
cout << " ', but
- * gcc on ppc seems to like this better. At least it seems to
- * prevent the memory corruption.
- */
-struct PCC_GCC_BUG
-{
- PCC_GCC_BUG( LookForArchUpdate & collect_r )
- : _collect( collect_r )
- {}
-
- bool operator()( PoolItem_Ref provider )
- { return _collect( provider ); }
-
- LookForArchUpdate & _collect;
-};
-
// ----------------------------------------------------------------------------
// Find best (according to edition) uninstalled item
@@ -1124,7 +1107,7 @@
resfilter::ByKind( item->kind() ) ),
resfilter::byArch( item->arch() ) ),
resfilter::byEdition( item->edition() )),
- PCC_GCC_BUG(info) );
+ functor::functorRef (info) );
_XDEBUG("findArchUpdateItem(" << item << ") => " << info.best);
return info.best;
@@ -1514,9 +1497,8 @@
% kind_to_string_localized(it->resolvable()->kind(), 1)
<< it->resolvable()->licenseToConfirm() << endl;
- //! \todo fix the spelling (10.3)
string question = _("In order to install this package, you must agree"
- " to terms of the above licencse. Continue?");
+ " to terms of the above license. Continue?");
if (!read_bool_answer(question, gSettings.license_auto_agree))
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-source-callbacks.h new/zypper-0.9.0/src/zypper-source-callbacks.h
--- old/zypper-0.8.24/src/zypper-source-callbacks.h 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-source-callbacks.h 2007-10-10 15:33:42.000000000 +0200
@@ -39,7 +39,7 @@
cout << "Determining " << url << " source type..." << endl;
}
- virtual void failedProbe( const zypp::Url &/*url*//*, const std::string & type )
+ virtual void failedProbe( const zypp::Url & url*//*, const std::string & type )
{
cout << ".. not " << type << endl;
}
@@ -49,7 +49,7 @@
cout << url << " is type " << type << endl;
}
- virtual void finish(const zypp::Url &/*url*//*, Error error, const std::string & reason )
+ virtual void finish(const zypp::Url & url*//*, Error error, const std::string & reason )
{
if ( error == INVALID )
{
@@ -58,10 +58,10 @@
}
}
- virtual bool progress(const zypp::Url &/*url*//*, int /*value*//*)
+ virtual bool progress(const zypp::Url & url*//*, int value*//*)
{ return true; }
- virtual Action problem( const zypp::Url &/*url*//*, Error error, const std::string & description )
+ virtual Action problem( const zypp::Url & url*//*, Error error, const std::string & description )
{
display_done ();
display_error (error, description);
@@ -250,23 +250,22 @@
struct RepoReportReceiver : public zypp::callback::ReceiveReportzypp::repo::RepoReport
-{
- virtual void start( zypp::Repository repo, const std::string & task )
+{
+ virtual void start(const zypp::ProgressData & pd, const zypp::RepoInfo repo)
{
- _task = task;
_repo = repo;
-
- display_step(0);
+
+ display_step(pd);
}
- void display_step( int value )
+ void display_step(const zypp::ProgressData & pd)
{
- display_progress ( "repo", cout, "(" + _repo.info().name() + ") " + _task , value);
+ display_progress("repo", cout, "(" + _repo.name() + ") " + pd.name(), pd.val());
}
- virtual bool progress( int value )
+ virtual bool progress(const zypp::ProgressData & pd)
{
- display_step(value);
+ display_step(pd);
return true;
}
@@ -288,8 +287,7 @@
display_error (error, reason);
}
- std::string _task;
- zypp::Repository _repo;
+ zypp::RepoInfo _repo;
};
///////////////////////////////////////////////////////////////////
}; // namespace ZmartRecipients
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-sources.cc new/zypper-0.9.0/src/zypper-sources.cc
--- old/zypper-0.8.24/src/zypper-sources.cc 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-sources.cc 2007-10-10 15:33:42.000000000 +0200
@@ -130,7 +130,7 @@
return true; // error
}
- return false; // no error
+ return false; // no error
}
// ---------------------------------------------------------------------------
@@ -206,7 +206,7 @@
RepoManager manager;
string specific_repo = copts.count("repo") ? copts["repo"].front() : "";
-
+
// rug compatibility
//! \todo support repo #
if (specific_repo.empty())
@@ -243,7 +243,7 @@
MIL << "checking if to refresh " << repo.name() << endl;
//! \todo honor command line options/commands
- bool do_refresh = repo.enabled() && repo.autorefresh();
+ bool do_refresh = repo.enabled() && repo.autorefresh();
if (do_refresh)
{
@@ -268,7 +268,7 @@
try { manager.refreshMetadata(repo, RepoManager::RefreshIfNeeded); }
// any exception thrown means zypp attempted to refresh the repo
// i.e. it is out-of-date. Thus, just display refresh hint for non-root
- // user
+ // user
catch (const Exception & ex)
{
cout << format(_(
@@ -277,7 +277,7 @@
<< endl;
string nonroot =
- "We're running as non-root, skipping refresh of " + repo.name();
+ "We're running as non-root, skipping refresh of " + repo.name();
MIL << nonroot << endl;
cout_vv << nonroot << endl;
}
@@ -293,7 +293,7 @@
int init_repos()
{
static bool done = false;
- //! \todo this has to be done so that it works in zypper shell
+ //! \todo this has to be done so that it works in zypper shell
if (done)
return ZYPPER_EXIT_OK;
@@ -303,6 +303,7 @@
}
done = true;
+ return ZYPPER_EXIT_OK;
}
// ----------------------------------------------------------------------------
@@ -366,7 +367,7 @@
{
RepoInfo repo = *it;
TableRow tr (gSettings.verbosity > VERBOSITY_NORMAL ? 6 : 7);
-
+
// number
tr << str::numstring (i);
// enabled?
@@ -509,7 +510,7 @@
if (argc)
{
bool specified_found = false;
-
+
// search for the repo alias among arguments
for (vector<string>::iterator it = arguments.begin();
it != arguments.end(); ++it)
@@ -519,7 +520,7 @@
arguments.erase(it);
break;
}
-
+
// search for the repo number among arguments
if (!specified_found)
for (vector<string>::iterator it = arguments.begin();
@@ -527,7 +528,7 @@
{
unsigned tmp = 0;
safe_lexical_cast (*it, tmp);
- if (tmp == repo_number)
+ if (tmp == repo_number)
{
specified_found = true;
arguments.erase(it);
@@ -559,22 +560,35 @@
continue;
}
+
// do the refresh
+
+ // raw metadata refresh
bool error = false;
if (!copts.count("build-only"))
{
bool force_download =
copts.count("force") || copts.count("force-download");
+ // without this a cd is required to be present in the drive on each refresh
+ // (or more 'refresh needed' check)
+ bool is_cd = is_changeable_media(*repo.baseUrlsBegin());
+ if (!force_download && is_cd)
+ {
+ MIL << "Skipping refresh of a changeable read-only media." << endl;
+ continue;
+ }
+
MIL << "calling refreshMetadata" << (force_download ? ", forced" : "")
<< endl;
error = refresh_raw_metadata(repo, force_download);
}
+ // db rebuild
if (!(error || copts.count("download-only")))
{
- bool force_build =
+ bool force_build =
copts.count("force") || copts.count("force-build");
MIL << "calling buildCache" << (force_build ? ", forced" : "") << endl;
@@ -656,12 +670,11 @@
// ----------------------------------------------------------------------------
-//! \todo handle zypp exceptions
static
int add_repo(RepoInfo & repo)
{
RepoManager manager;
-
+
bool is_cd = true;
for(RepoInfo::urls_const_iterator it = repo.baseUrlsBegin();
it != repo.baseUrlsEnd(); ++it)
@@ -672,10 +685,11 @@
}
if (is_cd)
{
- cout_v << _("This is a changeable read-only media (CD/DVD), disabling autorefresh.") << endl;
+ cout_v << _("This is a changeable read-only media (CD/DVD), disabling autorefresh.") << endl;
repo.setAutorefresh(false);
}
+
MIL << "Going to add repository: " << repo << endl;
try
@@ -735,7 +749,7 @@
else
{
// TranslatorExplanation used as e.g. "Enabled: Yes"
- cout_n << _("Enabled") << ": " << (repo.enabled() ? _("Yes") : _("No")) << endl;
+ cout_n << _("Enabled") << ": " << (repo.enabled() ? _("Yes") : _("No")) << endl;
// TranslatorExplanation used as e.g. "Autorefresh: Yes"
cout_n << _("Autorefresh") << ": " << (repo.autorefresh() ? _("Yes") : _("No")) << endl;
cout_n << "URL: " << *repo.baseUrlsBegin() << endl;
@@ -766,20 +780,23 @@
const string & type,
tribool enabled, tribool autorefresh)
{
+ MIL << "going to add repository by url (alias=" << alias << ", url=" << url
+ << ")" << endl;
+
RepoManager manager;
RepoInfo repo;
-
+
if ( ! type.empty() )
repo.setType(RepoType(type));
-
+
repo.setAlias(alias.empty() ? timestamp() : alias);
repo.addBaseUrl(url);
-
+
if ( !indeterminate(enabled) )
repo.setEnabled((enabled == true));
if ( !indeterminate(autorefresh) )
repo.setAutorefresh((autorefresh == true));
-
+
return add_repo(repo);
}
@@ -790,7 +807,10 @@
tribool enabled, tribool autorefresh)
{
//! \todo handle local .repo files, validate the URL
- Url url(repo_file_url);
+ Url url = make_url(repo_file_url);
+ if (!url.isValid())
+ return ZYPPER_EXIT_ERR_INVALID_ARGS;
+
RepoManager manager;
list<RepoInfo> repos;
@@ -849,7 +869,7 @@
}
// ----------------------------------------------------------------------------
-
+/*
static
bool looks_like_url (const string& s) {
static bool schemes_shown = false;
@@ -867,7 +887,7 @@
}
return false;
}
-
+*/
static bool do_remove_repo(const RepoInfo & repoinfo)
{
RepoManager manager;
@@ -933,7 +953,7 @@
catch (const RepoNotFoundException & ex)
{
cerr << format(_("Repository %s not found.")) % alias << endl;
- ERR << "Repo " << alias << " not found" << endl;
+ ERR << "Repo " << alias << " not found" << endl;
}
catch (const Exception & ex)
{
@@ -950,7 +970,7 @@
void modify_repo(const string & alias)
{
// tell whether currenlty processed options are contradicting each other
- bool contradiction = false;
+ // bool contradiction = false;
// TranslatorExplanation speaking of two mutually contradicting command line options
string msg_contradition =
_("%s used together with %s, which contradict each other."
@@ -965,7 +985,7 @@
if (enable)
{
cerr << format(msg_contradition) % "--enable" % "--disable" << endl;
-
+
enable = indeterminate;
}
else
@@ -1010,7 +1030,7 @@
catch (const RepoNotFoundException & ex)
{
cerr << format(_("Repository %s not found.")) % alias << endl;
- ERR << "Repo " << alias << " not found" << endl;
+ ERR << "Repo " << alias << " not found" << endl;
}
catch (const Exception & ex)
{
@@ -1025,7 +1045,7 @@
// ---------------------------------------------------------------------------
void cond_load_resolvables(bool to_pool)
-{
+{
load_repo_resolvables(to_pool);
if (!gSettings.disable_system_resolvables && to_pool)
load_target_resolvables();
@@ -1046,7 +1066,7 @@
if (! it->enabled())
continue; // #217297
- try
+ try
{
bool error = false;
// if there is no metadata locally
@@ -1101,7 +1121,7 @@
cout_n << _("Reading RPM database...");
MIL << "Going to read RPM database" << endl;
- ResStore tgt_resolvables(God->target()->resolvables());
+ ResStore tgt_resolvables(God->target()->resolvables());
if (!gSettings.machine_readable)
{
@@ -1125,7 +1145,7 @@
cerr_vv << "Constructing SourceManager" << endl;
SourceManager_Ptr manager = SourceManager::sourceManager();
cerr_vv << "Restoring SourceManager" << endl;
- manager->restore (gSettings.root_dir, true /*use_cache*//*);
+ manager->restore (gSettings.root_dir, true use_cache*//*);
Source_Ref src;
@@ -1183,7 +1203,7 @@
}
cerr_vv << "Storing source data" << endl;
- manager->store( gSettings.root_dir, true /*metadata_cache*//* );
+ manager->store( gSettings.root_dir, true metadata_cache*//* );
}
*/
// ----------------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-tabulator.cc new/zypper-0.9.0/src/zypper-tabulator.cc
--- old/zypper-0.8.24/src/zypper-tabulator.cc 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-tabulator.cc 2007-10-10 15:33:42.000000000 +0200
@@ -1,6 +1,9 @@
#include <iostream>
+#include <cstring>
+
#include "zypper-tabulator.h"
using namespace std;
+#include
TableStyle Table::defaultStyle = Ascii;
@@ -19,6 +22,50 @@
{ "\xE2\x95\x91", "\xE2\x94\x80", "\xE2\x95\xAB"}, ///< v double, h light
};
+// A non-ASCII string has 3 different lengths:
+// - bytes
+// - characters (non-ASCII ones have multiple bytes in UTF-8)
+// - columns (Chinese characters are 2 columns wide)
+// In #328918 see how confusing these leads to misalignment.
+
+// return the number of columns in str, or -1 if there's an error
+static
+int string_to_columns_e (const string& str) {
+ // from smpppd.src.rpm/format.cc, thanks arvin
+
+ const char* ptr = str.c_str ();
+ size_t s_bytes = str.length ();
+ int s_cols = 0;
+
+ mbstate_t shift_state;
+ memset (&shift_state, 0, sizeof (shift_state));
+
+ wchar_t wc;
+ size_t c_bytes;
+
+ // mbrtowc produces one wide character from a multibyte string
+ while ((c_bytes = mbrtowc (&wc, ptr, s_bytes, &shift_state)) > 0) {
+ if (c_bytes >= (size_t) -2) // incomplete (-2) or invalid (-1) sequence
+ return -1;
+
+ s_cols += wcwidth (wc);
+
+ s_bytes -= c_bytes;
+ ptr += c_bytes;
+ }
+
+ return s_cols;
+}
+
+static
+unsigned string_to_columns (const string& str) {
+ int c = string_to_columns_e (str);
+ if (c < 0)
+ return str.length(); // fallback if there was an error
+ else
+ return (unsigned) c;
+}
+
void TableRow::add (const string& s) {
_columns.push_back (s);
}
@@ -58,8 +105,10 @@
}
seen_first = true;
- stream.width (widths[c]);
+// stream.width (widths[c]);// that does not work with multibyte chars
stream << *i;
+ stream.width (widths[c] - string_to_columns (*i));
+ stream << "";
}
stream << endl;
}
@@ -86,8 +135,8 @@
_max_width.resize (_max_col + 1);
unsigned &max = _max_width[c];
- // FIXME: i18n: screen columns
- unsigned cur = i->length();
+ unsigned cur = string_to_columns (*i);
+
if (max < cur)
max = cur;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-utils.cc new/zypper-0.9.0/src/zypper-utils.cc
--- old/zypper-0.8.24/src/zypper-utils.cc 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-utils.cc 2007-10-10 15:33:42.000000000 +0200
@@ -52,9 +52,21 @@
bool is_changeable_media(const zypp::Url & url)
{
- media::MediaManager mm; media::MediaAccessId id = mm.open(url);
- bool is_cd = mm.isChangeable(id);
- mm.close(id);
+ MIL << "Checking if this is a changeable medium" << endl;
+ bool is_cd = false;
+ try
+ {
+ media::MediaManager mm;
+ media::MediaAccessId id = mm.open(url);
+ is_cd = mm.isChangeable(id);
+ mm.close(id);
+ }
+ catch (const media::MediaException & e)
+ {
+ ZYPP_CAUGHT(e);
+ WAR << "Could not determine if the URL points to a changeable medium" << endl;
+ }
+
return is_cd;
}
@@ -87,3 +99,19 @@
// default
return _PL("resolvable", "resolvables", count);
}
+
+// ----------------------------------------------------------------------------
+
+Url make_url (const string & url_s) {
+ Url u;
+
+ try {
+ u = Url( (url_s[0] == '/') ? string("dir:") + url_s : url_s );
+ }
+ catch ( const Exception & excpt_r ) {
+ ZYPP_CAUGHT( excpt_r );
+ cerr << _("Given URL is invalid.") << endl;
+ cerr << excpt_r.asUserString() << endl;
+ }
+ return u;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/src/zypper-utils.h new/zypper-0.9.0/src/zypper-utils.h
--- old/zypper-0.8.24/src/zypper-utils.h 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/src/zypper-utils.h 2007-10-10 15:33:42.000000000 +0200
@@ -21,4 +21,10 @@
std::string kind_to_string_localized(
const zypp::KindOfzypp::Resolvable & kind, unsigned long count);
+/**
+ * Constructor wrapper catching exceptions,
+ * returning an empty one on error.
+ */
+zypp::Url make_url (const std::string & url_s);
+
#endif /*ZYPPER_UTILS_H*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/zypper-0.8.24/VERSION.cmake new/zypper-0.9.0/VERSION.cmake
--- old/zypper-0.8.24/VERSION.cmake 2007-09-28 15:32:21.000000000 +0200
+++ new/zypper-0.9.0/VERSION.cmake 2007-10-10 15:33:42.000000000 +0200
@@ -19,5 +19,5 @@
#
SET(VERSION_MAJOR "0")
-SET(VERSION_MINOR "8")
-SET(VERSION_PATCH "24")
+SET(VERSION_MINOR "9")
+SET(VERSION_PATCH "0")
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org