summaryrefslogtreecommitdiff
path: root/src/apk_package.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-22 08:45:40 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-22 08:45:40 +0200
commitbf82e2e5fd45f4ba425a128ae4fdb6144c82f218 (patch)
treeb7d97e0aede851d3d0222ee30141cb00bccf217f /src/apk_package.h
parent568d57336d84179b3e97a301872890dc51969a36 (diff)
downloadapk-tools-bf82e2e5fd45f4ba425a128ae4fdb6144c82f218.tar.gz
apk-tools-bf82e2e5fd45f4ba425a128ae4fdb6144c82f218.tar.bz2
apk-tools-bf82e2e5fd45f4ba425a128ae4fdb6144c82f218.tar.xz
apk-tools-bf82e2e5fd45f4ba425a128ae4fdb6144c82f218.zip
db, solver, io: scan cache items at startup
It is faster to just scan the cache directory for existing packages at startup than trying to faccessat() them on demand. It also makes quite a few parts of the code more readable and simpler.
Diffstat (limited to 'src/apk_package.h')
-rw-r--r--src/apk_package.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/apk_package.h b/src/apk_package.h
index 4f8cec0..329bdec 100644
--- a/src/apk_package.h
+++ b/src/apk_package.h
@@ -96,8 +96,9 @@ struct apk_package {
struct apk_dependency_array *depends, *install_if;
size_t installed_size, size;
time_t build_time;
- unsigned repos;
unsigned int topology_hard;
+ unsigned in_cache : 1;
+ unsigned repos : APK_MAX_REPOS;
struct apk_checksum csum;
};
APK_ARRAY(apk_package_array, struct apk_package *);