diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-21 12:55:25 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-21 12:55:25 +0000 |
commit | ca0a88d9984f740b5ea06e39d0c7b2cb4709c73e (patch) | |
tree | e64e9b143fc082e72019dfd7af5ada7b288a692b /bin | |
parent | 1bf28a9631fbf18bab6ff80d6986a858bfb62d6d (diff) | |
download | portage-ca0a88d9984f740b5ea06e39d0c7b2cb4709c73e.tar.gz portage-ca0a88d9984f740b5ea06e39d0c7b2cb4709c73e.tar.bz2 portage-ca0a88d9984f740b5ea06e39d0c7b2cb4709c73e.zip |
Add support for --usepkg and --usepkgonly options together with
emerge --search. (trunk r9038)
svn path=/main/branches/2.1.2/; revision=9039
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/emerge | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/emerge b/bin/emerge index cefdb76b1..5725d8152 100755 --- a/bin/emerge +++ b/bin/emerge @@ -393,7 +393,7 @@ class search: # public interface # def __init__(self, settings, trees, spinner, searchdesc, - verbose): + verbose, usepkg, usepkgonly): """Searches the available and installed packages for the supplied search key. The list of available and installed packages is created at object instantiation. This makes successive searches faster.""" @@ -416,10 +416,10 @@ class search: bindb = trees["bintree"].dbapi vardb = trees["vartree"].dbapi - if portdb._have_root_eclass_dir: + if not usepkgonly and portdb._have_root_eclass_dir: self._dbs.append(portdb) - if bindb.cp_all(): + if (usepkg or usepkgonly) and bindb.cp_all(): self._dbs.append(bindb) self._dbs.append(vardb) @@ -5659,7 +5659,8 @@ def action_search(settings, trees, myopts, myfiles, spinner): else: searchinstance = search(settings, trees, spinner, "--searchdesc" in myopts, - "--quiet" not in myopts) + "--quiet" not in myopts, "--usepkg" in myopts, + "--usepkgonly" in myopts) for mysearch in myfiles: try: searchinstance.execute(mysearch) |