summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib/lib.h
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2008-04-11 08:26:06 +0000
committerpav <pav@FreeBSD.org>2008-04-11 08:26:06 +0000
commitdf43e8c984cf5b4b1ddd9908916a7ec8a2669a31 (patch)
tree10d3af807888e075cd1a6aec7853f38e50370ba8 /usr.sbin/pkg_install/lib/lib.h
parent65e9886a96e340738e55f0fec0827590e3d4715c (diff)
downloadFreeBSD-src-df43e8c984cf5b4b1ddd9908916a7ec8a2669a31.zip
FreeBSD-src-df43e8c984cf5b4b1ddd9908916a7ec8a2669a31.tar.gz
Optimize package registration/deregistration. Previously, when looking up the
package name for the origin of a dependency, all entries in /var/db/pkg were traversed for each dependency of added/removed package. Now, gather all the origins first, then do the lookup in a single pass over /var/db/pkg. This should provide a major speedup for packages with hundreds of dependencies. Submitted by: rdivacky (earlier version) MFC after: 1 month
Diffstat (limited to 'usr.sbin/pkg_install/lib/lib.h')
-rw-r--r--usr.sbin/pkg_install/lib/lib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h
index cfa95ca..3e0ce7e 100644
--- a/usr.sbin/pkg_install/lib/lib.h
+++ b/usr.sbin/pkg_install/lib/lib.h
@@ -225,6 +225,7 @@ int real_main(int, char **);
/* Query installed packages */
char **matchinstalled(match_t, char **, int *);
char **matchbyorigin(const char *, int *);
+char **matchallbyorigin(const char **, int *);
int isinstalledpkg(const char *name);
int pattern_match(match_t MatchType, char *pattern, const char *pkgname);
OpenPOWER on IntegriCloud