diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-09-19 21:04:30 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-09-19 21:04:30 +0300 |
commit | 54fae3a9ca0af5ab29cc02d9c91fc2c63c6bc872 (patch) | |
tree | 300def013e8b61ee260bca3ca8f3ff96d59b7290 /libpkgconf/cache.c | |
parent | df3f033ad8586bb28503d204eac4e02990f64a44 (diff) |
Merge with latest original package version (master branch)
Diffstat (limited to 'libpkgconf/cache.c')
-rw-r--r-- | libpkgconf/cache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpkgconf/cache.c b/libpkgconf/cache.c index 986eba5..1662ce5 100644 --- a/libpkgconf/cache.c +++ b/libpkgconf/cache.c @@ -13,6 +13,7 @@ * from the use of this software. */ +#include <libpkgconf/stdinc.h> #include <libpkgconf/libpkgconf.h> /* @@ -84,6 +85,9 @@ pkgconf_cache_add(pkgconf_client_t *client, pkgconf_pkg_t *pkg) pkgconf_node_insert(&pkg->cache_iter, pkg, &client->pkg_cache); PKGCONF_TRACE(client, "added @%p to cache", pkg); + + /* mark package as cached */ + pkg->flags |= PKGCONF_PKG_PROPF_CACHED; } /* @@ -103,6 +107,9 @@ pkgconf_cache_remove(pkgconf_client_t *client, pkgconf_pkg_t *pkg) if (pkg == NULL) return; + if (!(pkg->flags & PKGCONF_PKG_PROPF_CACHED)) + return; + PKGCONF_TRACE(client, "removed @%p from cache", pkg); pkgconf_node_delete(&pkg->cache_iter, &client->pkg_cache); |