Author: jkupec
Date: Fri Jul 11 17:04:35 2008
New Revision: 10545
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10545&view=rev
Log:
- updated man page
- enabled -r for rl (needs fixing)
- updated locks help text
Modified:
trunk/zypper/doc/zypper.8
trunk/zypper/src/Zypper.cc
trunk/zypper/src/locks.cc
Modified: trunk/zypper/doc/zypper.8
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/doc/zypper.8?rev=10545&r1=10544&r2=10545&view=diff
==============================================================================
--- trunk/zypper/doc/zypper.8 (original)
+++ trunk/zypper/doc/zypper.8 Fri Jul 11 17:04:35 2008
@@ -1,4 +1,4 @@
-.TH "zypper" "8" "0.11.7" "zypper" "System Tools"
+.TH "zypper" "8" "0.12.0" "zypper" "System Tools"
.SH "SYNTAX"
.LP
zypper [\fI\-\-global\-options\fR] <\fBcommand\fR> [\fI\-\-command\-options\fR] [\fBcommand-arguments\fR]
@@ -713,7 +713,7 @@
List currently active package locks.
.TP
-.B addlock (al) [options] <package-name>
+.B addlock (al) [options] <package-name> ...
Add a package lock. Specify packages to lock by exact name or by a glob pattern using '*' and '?'
wildcard characters.
@@ -725,10 +725,14 @@
Type of resolvable (package, patch, pattern, product). Default: package.
.TP
-.B removelock (rl)
+.B removelock (rl) [options] ...
Remove specified package lock. Specify the lock to remove by its number obtained with 'zypper locks'
or by the package name.
+.TP
+.I \-r, \-\-repo
+Restrict the lock to the specified repository.
+
.SH "GLOBAL OPTIONS"
.TP
Modified: trunk/zypper/src/Zypper.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/Zypper.cc?rev=10545&r1=10544&r2=10545&view=diff
==============================================================================
--- trunk/zypper/src/Zypper.cc (original)
+++ trunk/zypper/src/Zypper.cc Fri Jul 11 17:04:35 2008
@@ -1660,7 +1660,7 @@
};
specific_options = options;
_command_help = str::form(_(
- "addlock (al) [options] <packagename>\n"
+ "addlock (al) [options] <packagename> ...\n"
"\n"
"Add a package lock. Specify packages to lock by exact name or by a"
" glob pattern using '*' and '?' wildcard characters.\n"
@@ -1678,18 +1678,22 @@
{
static struct option options[] =
{
+ {"repo", required_argument, 0, 'r'},
+ // rug compatiblity (although rug does not seem to support this)
+ {"catalog", required_argument, 0, 'c'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
specific_options = options;
- _command_help = _(
- "removelock (rl) <lock-number>\n"
+ _command_help = str::form(_(
+ "removelock (rl) [options] ...\n"
"\n"
"Remove a package lock. Specify the lock to remove by its number obtained"
- " with 'zypper locks'.\n"
+ " with '%s' or by package name.\n"
"\n"
- "This command has no additional options.\n"
- );
+ " Command options:\n"
+ "-r, --repo Remove only locks with specified repository.\n"
+ ), "zypper locks");
break;
}
@@ -3130,7 +3134,7 @@
return;
}
- if (_arguments.size() == 1)
+ if (_arguments.size() < 1)
{
report_required_arg_missing(out(), _command_help);
setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
Modified: trunk/zypper/src/locks.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/locks.cc?rev=10545&r1=10544&r2=10545&view=diff
==============================================================================
--- trunk/zypper/src/locks.cc (original)
+++ trunk/zypper/src/locks.cc Fri Jul 11 17:04:35 2008
@@ -182,7 +182,6 @@
}
else //package name
{
- //TODO localize
//TODO fill query in one method to have consistent add/remove
//TODO what to do with repo and kinds?
PoolQuery q;
@@ -205,16 +204,16 @@
//hack to remove unique lock added by zypper
int res = 0;
PoolQuery& last = q;
- for_( it, locks.begin(),locks.end() )
+ for_( it, locks.begin(), locks.end() )
{
PoolQuery::StrContainer sc = it->attribute(sat::SolvAttr::name);
- if (sc.size()==1 && sc.count(*args_it) )
+ if (sc.size() == 1 && sc.count(*args_it))
{
res++;
last = *it;
}
}
-
+
if (res == 1) //only one with identical name, then remove it
locks.removeLock(last);
else
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org