Mailinglist Archive: opensuse-commit (2092 mails)
| < Previous | Next > |
commit zypper
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Wed, 29 Aug 2007 22:55:06 +0200
- Message-id: <20070829205506.4F1EF6781B8@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package zypper
checked in at Wed Aug 29 22:55:06 CEST 2007.
--------
--- zypper/zypper.changes 2007-08-28 18:56:14.000000000 +0200
+++ /mounts/work_src_done/STABLE/zypper/zypper.changes 2007-08-29 12:56:29.000000000 +0200
@@ -1,0 +2,19 @@
+Wed Aug 29 12:51:42 CEST 2007 - jkupec@xxxxxxx
+
+- proper fix for y/n translation (#304650)
+- r6965
+
+-------------------------------------------------------------------
+Wed Aug 29 12:43:17 CEST 2007 - jkupec@xxxxxxx
+
+- expect MediaException during commit (#305113)
+- r6964
+
+-------------------------------------------------------------------
+Tue Aug 28 19:26:36 CEST 2007 - jkupec@xxxxxxx
+
+- displaying repo name instead of alias where appropriate (#304659)
+- don't display URI by default (#230335)
+- r6947
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zypper.spec ++++++
--- /var/tmp/diff_new_pack.D15368/_old 2007-08-29 22:54:33.000000000 +0200
+++ /var/tmp/diff_new_pack.D15368/_new 2007-08-29 22:54:33.000000000 +0200
@@ -21,7 +21,7 @@
PreReq: permissions
Summary: Command Line Package Management Using Libzypp
Version: 0.8.17
-Release: 2
+Release: 4
Source: zypper-0.8.17.tar.bz2
Prefix: /usr
URL: http://en.opensuse.org/Zypper
@@ -97,6 +97,16 @@
%ghost %config(noreplace) %{_var}/log/zypper.log
%changelog
+* Wed Aug 29 2007 - jkupec@xxxxxxx
+- proper fix for y/n translation (#304650)
+- r6965
+* Wed Aug 29 2007 - jkupec@xxxxxxx
+- expect MediaException during commit (#305113)
+- r6964
+* Tue Aug 28 2007 - jkupec@xxxxxxx
+- displaying repo name instead of alias where appropriate (#304659)
+- don't display URI by default (#230335)
+- r6947
* Tue Aug 28 2007 - kkaempf@xxxxxxx
- Don't search disabled repos, override with --repo (#304653)
- r 6945
++++++ zypper-0.8.17.tar.bz2 ++++++
++++ 1796 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.17/doc/devel-checklist new/zypper-0.8.17/doc/devel-checklist
--- old/zypper-0.8.17/doc/devel-checklist 1970-01-01 01:00:00.000000000 +0100
+++ new/zypper-0.8.17/doc/devel-checklist 2007-08-29 12:56:27.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.17/package/zypper.changes new/zypper-0.8.17/package/zypper.changes
--- old/zypper-0.8.17/package/zypper.changes 2007-08-28 18:55:45.000000000 +0200
+++ new/zypper-0.8.17/package/zypper.changes 2007-08-29 12:56:28.000000000 +0200
@@ -1,4 +1,23 @@
-------------------------------------------------------------------
+Wed Aug 29 12:51:42 CEST 2007 - jkupec@xxxxxxx
+
+- proper fix for y/n translation (#304650)
+- r6965
+
+-------------------------------------------------------------------
+Wed Aug 29 12:43:17 CEST 2007 - jkupec@xxxxxxx
+
+- expect MediaException during commit (#305113)
+- r6964
+
+-------------------------------------------------------------------
+Tue Aug 28 19:26:36 CEST 2007 - jkupec@xxxxxxx
+
+- displaying repo name instead of alias where appropriate (#304659)
+- don't display URI by default (#230335)
+- r6947
+
+-------------------------------------------------------------------
Tue Aug 28 18:53:01 CEST 2007 - kkaempf@xxxxxxx
- Don't search disabled repos, override with --repo (#304653)
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.17/src/zypper-callbacks.cc new/zypper-0.8.17/src/zypper-callbacks.cc
--- old/zypper-0.8.17/src/zypper-callbacks.cc 2007-08-28 18:55:45.000000000 +0200
+++ new/zypper-0.8.17/src/zypper-callbacks.cc 2007-08-29 12:56:27.000000000 +0200
@@ -126,14 +126,15 @@
bool read_bool_answer(const string & question, bool default_answer)
{
if (!gSettings.machine_readable)
- cout << CLEARLN << question
- << " [" << _("y") << "/" << _("n") << "]: " << flush;
+ cout << CLEARLN << question
+ << " [" << _("yes") << "/" << _("no") << "]: "
+ << flush;
// non-interactive mode: print the answer for convenience and return default
if (gSettings.non_interactive)
{
- if (!gSettings.machine_readable)
- cout << (default_answer ? 'y' : 'n') << endl;
+ if (!gSettings.machine_readable)
+ cout << (default_answer ? _("yes") : _("no")) << endl;
MIL << "answer (default): " << (default_answer ? 'y' : 'n') << endl;
return default_answer;
}
@@ -142,36 +143,23 @@
string c = "";
bool been_here_before = false;
- while (stm.good ()
- // TranslatorExplanation This is a Lowercase 'y' for "yes" used as an
- // answer in y/n prompts. This letter will appear in the "Question [y/n]"
- // prompts and will be expected as a possible answer.
- && c != _("y")
- // TranslatorExplanation Uppercase 'Y' for "yes" used as an
- // answer in y/n prompts.
- && c != _("Y")
- // TranslatorExplanation Lowercase 'n' for "no" used as an
- // answer in y/n prompts. This letter will appear in the "Question [y/n]"
- // prompts and will be expected as a possible answer.
- && c != _("n")
- // TranslatorExplanation Uppercase 'N' for "no" used as an
- // answer in y/n prompts.
- && c != _("N"))
+ while (stm.good() && rpmatch(c.c_str()) == -1)
{
if (been_here_before)
- // TranslatorExplanation Example: Invalid answer 'x', enter 'y' or 'n':
- cerr << format(_("Invalid answer '%s', enter '%s' or '%s':"))
- % c % _("y") % _("n") << " ";
+ cerr << format(
+ // TranslatorExplanation don't translate the 'y' and 'n', they can always be used as answers.
+ // The second and the third %s is the translated 'yes' and 'no' string (lowercase).
+ _("Invalid answer '%s'. Enter 'y' for '%s' or 'n' for '%s' if nothing else works for you"))
+ % c % _("yes") % _("no") << ": ";
c = zypp::str::getline (stm, zypp::str::TRIM);
been_here_before = true;
}
MIL << "answer: " << c << endl;
- if (c == _("y") || c == _("Y"))
- return true;
- else if (c == _("n") || c == _("N"))
- return false;
- else
+ int answer = rpmatch(c.c_str());
+ if (answer >= 0)
+ return answer;
+ else // in case of !stm.good()
{
WAR << "could not read answer, returning default: "
<< (default_answer ? 'y' : 'n') << endl;
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.17/src/zypper-info.cc new/zypper-0.8.17/src/zypper-info.cc
--- old/zypper-0.8.17/src/zypper-info.cc 2007-08-28 18:55:45.000000000 +0200
+++ new/zypper-0.8.17/src/zypper-info.cc 2007-08-29 12:56:28.000000000 +0200
@@ -90,7 +90,7 @@
void printPkgInfo(const PoolItem & pool_item, const PoolItem & ins_pool_item) {
cout << (gSettings.is_rug_compatible ? _("Catalog: ") : _("Repository: "))
- << pool_item.resolvable()->repository().info().alias() << endl;
+ << pool_item.resolvable()->repository().info().name() << endl;
cout << _("Name: ") << pool_item.resolvable()->name() << endl;
cout << _("Version: ") << pool_item.resolvable()->edition().asString() << endl;
cout << _("Arch: ") << pool_item.resolvable()->arch().asString() << endl;
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.17/src/zypper-media-callbacks.h new/zypper-0.8.17/src/zypper-media-callbacks.h
--- old/zypper-0.8.17/src/zypper-media-callbacks.h 2007-08-28 18:55:45.000000000 +0200
+++ new/zypper-0.8.17/src/zypper-media-callbacks.h 2007-08-29 12:56:28.000000000 +0200
@@ -45,7 +45,7 @@
// TranslatorExplanation translate letters 'y' and 'n' the same as you translated the [y/n] prompt.
std::string request = boost::str(boost::format(
_("Please insert media [%s] # %d and type 'y' to continue or 'n' to cancel the operation."))
- % repo.info().alias() % mediumNr);
+ % repo.info().name() % mediumNr);
if (read_bool_answer(request, false))
return MediaChangeReport::RETRY;
else
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.17/src/zypper-media-callbacks.h.rej new/zypper-0.8.17/src/zypper-media-callbacks.h.rej
--- old/zypper-0.8.17/src/zypper-media-callbacks.h.rej 1970-01-01 01:00:00.000000000 +0100
+++ new/zypper-0.8.17/src/zypper-media-callbacks.h.rej 2007-08-29 12:56:28.000000000 +0200
@@ -0,0 +1,68 @@
+***************
+*** 20,25 ****
+ #include <zypp/Digest.h>
+ #include <zypp/Url.h>
+ #include <zypp/Source.h>
+
+ #include "AliveCursor.h"
+
+--- 20,26 ----
+ #include <zypp/Digest.h>
+ #include <zypp/Url.h>
+ #include <zypp/Source.h>
++ #include <zypp/media/MediaUserAuth.h>
+
+ #include "AliveCursor.h"
+
+***************
+*** 71,77 ****
+ display_error (error, konreason);
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////
+ }; // namespace ZmartRecipients
+ ///////////////////////////////////////////////////////////////////
+--- 72,113 ----
+ display_error (error, konreason);
+ }
+ };
++
++ struct AuthenticationReportReceiver : public zypp::callback::ReceiveReport<zypp::media::AuthenticationReport>
++ {
++ virtual bool prompt(const zypp::Url & url,
++ const std::string & description,
++ zypp::media::AuthData & auth_data)
++ {
++ std::cout << description << std::endl;
++
++ // curl authentication
++ zypp::media::CurlAuthData * auth_data_ptr =
++ dynamic_cast<zypp::media::CurlAuthData*> (&auth_data);
++ if (auth_data_ptr)
++ {
++ std::cout << "available auth types: "
++ << auth_data_ptr->authTypeAsString() << std::endl;
+
++ std::cout << "User Name: ";
++ string username;
++ std::cin >> username;
++ auth_data_ptr->setUserName(username);
++
++ std::cout << "Password: ";
++ string password;
++ std::cin >> password;
++ if (password.empty()) return false;
++ auth_data_ptr->setPassword(password);
++
++ auth_data_ptr->setAuthType("basic,digest");
++
++ return true;
++ }
++
++ return false;
++ }
++ };
+ ///////////////////////////////////////////////////////////////////
+ }; // 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.17/src/zypper-misc.cc new/zypper-0.8.17/src/zypper-misc.cc
--- old/zypper-0.8.17/src/zypper-misc.cc 2007-08-28 18:55:45.000000000 +0200
+++ new/zypper-0.8.17/src/zypper-misc.cc 2007-08-29 12:56:28.000000000 +0200
@@ -9,6 +9,7 @@
#include <zypp/SrcPackage.h>
#include <zypp/base/Algorithm.h>
#include <zypp/solver/detail/Helper.h>
+#include <zypp/media/MediaException.h>
#include <zypp/RepoManager.h>
#include <zypp/RepoInfo.h>
@@ -1384,10 +1385,18 @@
cerr_v << result << std::endl;
}
+ catch ( const media::MediaException & e ) {
+ ZYPP_CAUGHT(e);
+ report_problem(e,
+ _("Problem downloading the package file from the repository:"),
+ _("Please, see the above error message to for a hint."));
+ return ZYPPER_EXIT_ERR_ZYPP;
+ }
catch ( const Exception & excpt_r ) {
ZYPP_CAUGHT( excpt_r );
-
+
// special handling for failed integrity exception
+ //! \todo fix this in libzypp
if (excpt_r.msg().find("fails integrity check") != string::npos) {
cerr << endl
<< _("The package integrity check failed. This may be a problem"
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.17/src/zypper-sources.cc new/zypper-0.8.17/src/zypper-sources.cc
--- old/zypper-0.8.17/src/zypper-sources.cc 2007-08-28 18:55:45.000000000 +0200
+++ new/zypper-0.8.17/src/zypper-sources.cc 2007-08-29 12:56:27.000000000 +0200
@@ -302,14 +302,13 @@
// ----------------------------------------------------------------------------
-static void print_repo_list( const std::list<zypp::RepoInfo> &repos )
+static void print_rug_sources_list(const std::list<zypp::RepoInfo> &repos)
{
Table tbl;
+
+ // header
TableHeader th;
- th << "#";
- if (gSettings.is_rug_compatible) th << _("Status");
- else th << _("Enabled") << _("Refresh");
- th << _("Type") << _("Name") << "URI";
+ th << "#" << _("Status") << _("Type") << _("Name") << "URI";
tbl << th;
int i = 1;
@@ -318,32 +317,67 @@
it != repos.end(); ++it)
{
RepoInfo repo = *it;
- TableRow tr (gSettings.is_rug_compatible ? 5 : 6);
- tr << str::numstring (i);
+ TableRow tr(5);
+ // number
+ tr << str::numstring(i);
+
+ // status
// rug's status (active, pending => active, disabled <= enabled, disabled)
// this is probably the closest possible compatibility arrangement
- if (gSettings.is_rug_compatible)
- {
- tr << (repo.enabled() ? _("Active") : _("Disabled"));
- }
- // zypper status (enabled, autorefresh)
- else
- {
- tr << (repo.enabled() ? _("Yes") : _("No"));
- tr << (repo.autorefresh() ? _("Yes") : _("No"));
- }
+ tr << (repo.enabled() ? _("Active") : _("Disabled"));
+ // type
tr << repo.type().asString();
- tr << repo.alias();
-
- for ( RepoInfo::urls_const_iterator uit = repo.baseUrlsBegin();
- uit != repo.baseUrlsEnd();
- ++uit )
- {
- tr << (*uit).asString();
- }
+ // name
+ tr << repo.name();
+ // url
+ tr << (*repo.baseUrlsBegin()).asString();
+
+ tbl << tr;
+ i++;
+ }
+
+ cout << tbl;
+}
+
+// ----------------------------------------------------------------------------
+
+static void print_repo_list( const std::list<zypp::RepoInfo> &repos )
+{
+ Table tbl;
+
+ // header
+ TableHeader th;
+ th << "#" << _("Enabled") << _("Refresh") << _("Type") << _("Alias") << _("Name");
+ if (gSettings.verbosity > VERBOSITY_NORMAL)
+ th << "URI";
+ tbl << th;
+
+ int i = 1;
+
+ for (std::list<RepoInfo>::const_iterator it = repos.begin();
+ it != repos.end(); ++it)
+ {
+ RepoInfo repo = *it;
+ TableRow tr (gSettings.verbosity > VERBOSITY_NORMAL ? 6 : 7);
+ // number
+ tr << str::numstring (i);
+ // enabled?
+ tr << (repo.enabled() ? _("Yes") : _("No"));
+ // autorefresh?
+ tr << (repo.autorefresh() ? _("Yes") : _("No"));
+ // type
+ tr << repo.type().asString();
+ // alias
+ tr << repo.alias();
+ // name
+ tr << repo.name();
+ // url
+ if (gSettings.verbosity > VERBOSITY_NORMAL)
+ tr << (*repo.baseUrlsBegin()).asString(); //! \todo properly handle multiple baseurls
+
tbl << tr;
i++;
}
@@ -418,6 +452,9 @@
}
}
}
+ // print repo list the rug's way
+ else if (gSettings.is_rug_compatible)
+ print_rug_sources_list(repos);
// print repo list as table
else
print_repo_list(repos);
@@ -677,7 +714,7 @@
{
cout_n << ( repo.enabled() ? "[x]" : "[ ]" );
cout_n << ( repo.autorefresh() ? "* " : " " );
- cout_n << repo.alias() << " (" << *repo.baseUrlsBegin() << ")" << endl;
+ cout_n << repo.name() << " (" << *repo.baseUrlsBegin() << ")" << endl;
}
else
{
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |