-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libq/tree: have tree_foreach_pkg take a query atom
Allow to reduce the search by having a query atom. This will skip categories and packages not matching the atom, possibly avoiding lots of work. This needs to be exploited from applets where necessary. Signed-off-by: Fabian Groffen <[email protected]>
- Loading branch information
Showing
11 changed files
with
103 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2005-2019 Gentoo Foundation | ||
* Copyright 2005-2020 Gentoo Foundation | ||
* Distributed under the terms of the GNU General Public License v2 | ||
* | ||
* Copyright 2005-2010 Ned Ludd - <[email protected]> | ||
|
@@ -434,7 +434,7 @@ int qcheck_main(int argc, char **argv) | |
vdb = tree_open_vdb(portroot, portvdb); | ||
ret = -1; | ||
if (vdb != NULL) { | ||
ret = tree_foreach_pkg_sorted(vdb, qcheck_cb, &state); | ||
ret = tree_foreach_pkg_sorted(vdb, qcheck_cb, &state, NULL); | ||
tree_close(vdb); | ||
} | ||
if (array_cnt(regex_arr) > 0) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2005-2019 Gentoo Authors | ||
* Copyright 2005-2020 Gentoo Authors | ||
* Distributed under the terms of the GNU General Public License v2 | ||
* | ||
* Copyright 2005-2010 Ned Ludd - <[email protected]> | ||
|
@@ -376,7 +376,7 @@ int qdepends_main(int argc, char **argv) | |
t = tree_open(portroot, overlay); | ||
if (t != NULL) { | ||
ret = tree_foreach_pkg_sorted(t, | ||
qdepends_results_cb, &state); | ||
qdepends_results_cb, &state, NULL); | ||
tree_close(t); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2005-2019 Gentoo Foundation | ||
* Copyright 2005-2020 Gentoo Foundation | ||
* Distributed under the terms of the GNU General Public License v2 | ||
* | ||
* Copyright 2005-2010 Ned Ludd - <[email protected]> | ||
|
@@ -569,7 +569,7 @@ int qfile_main(int argc, char **argv) | |
if (nb_of_queries > 0) { | ||
tree_ctx *vdb = tree_open_vdb(portroot, portvdb); | ||
if (vdb != NULL) { | ||
found += tree_foreach_pkg_sorted(vdb, qfile_cb, &state); | ||
found += tree_foreach_pkg_sorted(vdb, qfile_cb, &state, NULL); | ||
tree_close(vdb); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2005-2019 Gentoo Foundation | ||
* Copyright 2005-2020 Gentoo Foundation | ||
* Distributed under the terms of the GNU General Public License v2 | ||
* | ||
* Copyright 2006 Thomas A. Cort - <[email protected]> | ||
|
@@ -799,7 +799,7 @@ qkeyword_traverse(tree_pkg_cb func, void *priv) | |
array_for_each(overlays, n, overlay) { | ||
tree_ctx *t = tree_open(portroot, overlay); | ||
if (t != NULL) { | ||
ret |= tree_foreach_pkg_sorted(t, qkeyword_results_cb, priv); | ||
ret |= tree_foreach_pkg_sorted(t, qkeyword_results_cb, priv, NULL); | ||
tree_close(t); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.