[equo] fix "equo query revisions", only search installed packages repo

This commit is contained in:
Fabio Erculiani
2010-01-28 20:10:28 +01:00
parent a8014a53e0
commit df211456ec
4 changed files with 16 additions and 31 deletions
+1 -2
View File
@@ -205,7 +205,6 @@ help_opts = [
(2, 'sets', 2, _('search available package sets')),
(2, 'slot', 2, _('show packages owning the provided slot')),
(2, 'tags', 2, _('show packages owning the provided tags')),
(2, 'revisions', 1, _('show packages owning the specified revisions')),
(2, 'graph', 2, _('show direct depdendencies tree for provided installable atoms')),
(3, '--complete', 2, _('include system packages, build deps and circularity information')),
(2, 'revgraph', 1, _('show reverse depdendencies tree for provided installed atoms')),
@@ -332,7 +331,7 @@ help_opts_extended = [
(3, 'search', 3, _('search packages inside the default repository database')),
(3, 'sets', 3, _('search available package sets')),
(3, 'tags', 3, _('show packages owning the specified tags')),
(3, 'revisions', 3, _('show packages owning the specified revisions')),
(3, 'revisions', 3, _('show installed packages owning the specified revisions')),
(3, '--verbose', 2, _('show more details')),
(3, '--quiet', 3, _('print results in a scriptable way')),
+13 -20
View File
@@ -1357,29 +1357,22 @@ def search_rev_packages(revisions, Equo = None):
found = False
if not etpUi['quiet']:
print_info(darkred(" @@ ")+darkgreen("%s..." % (_("Revision Search"),)))
print_info(bold(_("Installed packages repository")))
repo_number = 0
for repo in Equo.validRepositories:
repo_number += 1
dbconn = Equo.clientDbconn
for revision in revisions:
results = dbconn.searchRevisionedPackages(revision)
found = True
for idpackage in results:
print_package_info(idpackage, dbconn, Equo = Equo,
extended = etpUi['verbose'], strictOutput = etpUi['quiet'])
if not etpUi['quiet']:
print_info(blue(" #" + str(repo_number)) + \
bold(" " + Equo.SystemSettings['repositories']['available'][repo]['description']))
dbconn = Equo.open_repository(repo)
for revision in revisions:
results = dbconn.searchRevisionedPackages(revision)
found = True
for idpackage in results:
print_package_info(idpackage, dbconn, Equo = Equo,
extended = etpUi['verbose'], strictOutput = etpUi['quiet'])
if not etpUi['quiet']:
print_info(blue(" %s: " % (_("Keyword"),)) + \
bold("\t"+revision))
print_info(blue(" %s: " % (_("Found"),)) + \
bold("\t" + str(len(results))) + \
red(" %s" % (_("entries"),)))
print_info(blue(" %s: " % (_("Keyword"),)) + \
bold("\t"+revision))
print_info(blue(" %s: " % (_("Found"),)) + \
bold("\t" + str(len(results))) + \
red(" %s" % (_("entries"),)))
if not etpUi['quiet'] and not found:
print_info(darkred(" @@ ") + darkgreen("%s." % (_("No matches"),) ))
+1 -5
View File
@@ -592,7 +592,7 @@ show packages owning the specified tags
=item B<revisions>
show packages owning the specified revisions
show installed packages owning the specified revisions
=item B<graph>
@@ -1118,10 +1118,6 @@ search available package sets
show packages owning the specified tags
=item B<revisions>
show packages owning the specified revisions
=item B<--verbose>
show more details
+1 -4
View File
@@ -593,7 +593,7 @@ show packages owning the provided slot
show packages owning the specified tags
.IP "\fBrevisions\fR" 4
.IX Item "revisions"
show packages owning the specified revisions
show installed packages owning the specified revisions
.IP "\fBgraph\fR" 4
.IX Item "graph"
show direct depdendencies tree for provided installable atoms
@@ -975,9 +975,6 @@ search available package sets
.IP "\fBtags\fR" 4
.IX Item "tags"
show packages owning the specified tags
.IP "\fBrevisions\fR" 4
.IX Item "revisions"
show packages owning the specified revisions
.IP "\fB\-\-verbose\fR" 4
.IX Item "--verbose"
show more details