diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-06-28 20:36:16 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-06-29 09:29:57 +0300 |
commit | 233918e518f72e469ba39206abf70250bd6fc54a (patch) | |
tree | 426a311a98ffa3c4bc592287730b3a55e58a9197 /src/apk_database.h | |
parent | fac4cdb3fad6037e0841724a50d5364d16603f07 (diff) | |
download | apk-tools-233918e518f72e469ba39206abf70250bd6fc54a.tar.gz apk-tools-233918e518f72e469ba39206abf70250bd6fc54a.tar.bz2 apk-tools-233918e518f72e469ba39206abf70250bd6fc54a.tar.xz apk-tools-233918e518f72e469ba39206abf70250bd6fc54a.zip |
db: cache packages (ref #49)
If /etc/apk/cache is a symlink to directory, a copy of all installed
packages is stored there, and the index of remote repositories will
be there instead of /var/lib/apk. This enables to reconstruct running
system during boot.
Left as todo: remove cached copy when the package is removed, and
additional apk applet to download missing packages to cache and/or
remove extra items.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r-- | src/apk_database.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/apk_database.h b/src/apk_database.h index 6f18277..de7ce4b 100644 --- a/src/apk_database.h +++ b/src/apk_database.h @@ -4,7 +4,7 @@ * Copyright (C) 2008 Timo Teräs <timo.teras@iki.fi> * All rights reserved. * - * This program is free software; you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. See http://www.gnu.org/ for details. */ @@ -68,13 +68,14 @@ struct apk_name { struct apk_repository { char *url; - char *cache; + csum_t url_csum; }; struct apk_database { char *root; int root_fd, lock_fd; unsigned name_id, num_repos; + const char *cache_dir; struct apk_dependency_array *world; struct apk_string_array *protected_paths; |