Author: jkupec
Date: Wed Oct 10 14:20:42 2007
New Revision: 7479
URL: http://svn.opensuse.org/viewcvs/zypp?rev=7479&view=rev
Log:
Merged revisions 7357-7372,7378-7427,7429-7449,7452-7457,7460,7462-7465,7472-7478 via svnmerge from
http://svn.opensuse.org/svn/zypp/trunk/zypper
........
r7389 | jkupec | 2007-09-26 16:22:38 +0200 (Wed, 26 Sep 2007) | 2 lines
- locks doc update
........
r7391 | jkupec | 2007-09-27 09:11:22 +0200 (Thu, 27 Sep 2007) | 2 lines
- --capability short option fixed
........
r7397 | mlandres | 2007-09-27 13:49:02 +0200 (Thu, 27 Sep 2007) | 1 line
fixed comparison between signed and unsigned int
........
r7398 | mlandres | 2007-09-27 13:53:27 +0200 (Thu, 27 Sep 2007) | 1 line
fixed control reaches end of non-void function
........
r7420 | mvidner | 2007-10-02 10:01:21 +0200 (Tue, 02 Oct 2007) | 2 lines
Fixed misalignment in localized tables (#328918).
........
r7449 | jkupec | 2007-10-06 12:16:31 +0200 (Sat, 06 Oct 2007) | 1 line
- don't check if to refresh cd/dvd repos even on user request unless forced
........
r7460 | jkupec | 2007-10-06 18:19:23 +0200 (Sat, 06 Oct 2007) | 2 lines
- correctly translate the command list (#327487)
........
r7465 | jkupec | 2007-10-08 14:34:03 +0200 (Mon, 08 Oct 2007) | 1 line
- missing -y option added to the update command (#331632)
........
Modified:
branches/SuSE-Linux-10_3-Branch/zypper/ (props changed)
branches/SuSE-Linux-10_3-Branch/zypper/VERSION.cmake
branches/SuSE-Linux-10_3-Branch/zypper/doc/zypper.8
branches/SuSE-Linux-10_3-Branch/zypper/package/zypper.changes
branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-misc.cc
branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-sources.cc
branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-tabulator.cc
branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-utils.cc
branches/SuSE-Linux-10_3-Branch/zypper/src/zypper.cc
Modified: branches/SuSE-Linux-10_3-Branch/zypper/VERSION.cmake
URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-10_3-Branch/zypper/VERSION.cmake?rev=7479&r1=7478&r2=7479&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/zypper/VERSION.cmake (original)
+++ branches/SuSE-Linux-10_3-Branch/zypper/VERSION.cmake Wed Oct 10 14:20:42 2007
@@ -20,4 +20,4 @@
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "8")
-SET(VERSION_PATCH "24")
+SET(VERSION_PATCH "25")
Modified: branches/SuSE-Linux-10_3-Branch/zypper/doc/zypper.8
URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-10_3-Branch/zypper/doc/zypper.8?rev=7479&r1=7478&r2=7479&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/zypper/doc/zypper.8 (original)
+++ branches/SuSE-Linux-10_3-Branch/zypper/doc/zypper.8 Wed Oct 10 14:20:42 2007
@@ -1,4 +1,4 @@
-.TH "zypper" "8" "0.7.0" "zypper" "System Tools"
+.TH "zypper" "8" "0.8.25" "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]"
Modified: branches/SuSE-Linux-10_3-Branch/zypper/package/zypper.changes
URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-10_3-Branch/zypper/package/zypper.changes?rev=7479&r1=7478&r2=7479&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/zypper/package/zypper.changes (original)
+++ branches/SuSE-Linux-10_3-Branch/zypper/package/zypper.changes Wed Oct 10 14:20:42 2007
@@ -1,7 +1,13 @@
-------------------------------------------------------------------
-Wed Oct 10 13:48:33 CEST 2007 - jkupec@suse.cz
-
+Tue Sep 25 17:59:22 CEST 2007 - jkupec@suse.cz
+- missing -y option added to the update command (#331632)
+- Fixed misalignment in localized tables (#328918) (mvidner).
+- correctly translate the command list (#327487)
+- don't check if to refresh cd/dvd repos even on user request unless forced
+- man page updated
- translations update
+- r7479
+- 0.8.25
-------------------------------------------------------------------
Fri Sep 28 15:10:35 CEST 2007 - ma@suse.de
Modified: branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-misc.cc?rev=7479&r1=7478&r2=7479&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-misc.cc (original)
+++ branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-misc.cc Wed Oct 10 14:20:42 2007
@@ -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, " ");
Modified: branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-sources.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-sources.cc?rev=7479&r1=7478&r2=7479&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-sources.cc (original)
+++ branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-sources.cc Wed Oct 10 14:20:42 2007
@@ -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,7 +670,6 @@
// ----------------------------------------------------------------------------
-//! \todo handle zypp exceptions
static
int add_repo(RepoInfo & repo)
{
@@ -672,7 +685,7 @@
}
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);
}
@@ -735,7 +748,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;
@@ -933,7 +946,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)
{
@@ -965,7 +978,7 @@
if (enable)
{
cerr << format(msg_contradition) % "--enable" % "--disable" << endl;
-
+
enable = indeterminate;
}
else
@@ -1010,7 +1023,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 +1038,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 +1059,7 @@
if (! it->enabled())
continue; // #217297
- try
+ try
{
bool error = false;
// if there is no metadata locally
@@ -1101,7 +1114,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)
{
Modified: branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-tabulator.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-tabulator.cc?rev=7479&r1=7478&r2=7479&view=diff
==============================================================================
--- branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-tabulator.cc (original)
+++ branches/SuSE-Linux-10_3-Branch/zypper/src/zypper-tabulator.cc Wed Oct 10 14:20:42 2007
@@ -1,6 +1,7 @@
#include <iostream>
#include "zypper-tabulator.h"
using namespace std;
+#include