summaryrefslogtreecommitdiff
path: root/src/audit.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-12 19:17:46 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-12 19:17:46 +0300
commit36b5cee98b1e80a493d291e9bffa1ed120ed908a (patch)
tree88855947e73b5e0f0a0dda3bd138064c401ff441 /src/audit.c
parentdee6ffa492c2efee982dcd0b4724213317eceb37 (diff)
downloadapk-tools-36b5cee98b1e80a493d291e9bffa1ed120ed908a.tar.gz
apk-tools-36b5cee98b1e80a493d291e9bffa1ed120ed908a.tar.bz2
apk-tools-36b5cee98b1e80a493d291e9bffa1ed120ed908a.tar.xz
apk-tools-36b5cee98b1e80a493d291e9bffa1ed120ed908a.zip
db, pkg: separate structure for fields of installed packages
this makes the database package entry smaller, and we propbably get more fields to installed_package later too. this cleans up the way scripts are stored and is a preparation for supporting triggers. some parsing for trigger meta-data. ref #45.
Diffstat (limited to 'src/audit.c')
-rw-r--r--src/audit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/audit.c b/src/audit.c
index df6dbdc..9867227 100644
--- a/src/audit.c
+++ b/src/audit.c
@@ -106,6 +106,7 @@ static int audit_backup(struct apk_database *db)
static int audit_system(struct apk_database *db)
{
+ struct apk_installed_package *ipkg;
struct apk_package *pkg;
struct apk_db_dir_instance *diri;
struct apk_db_file *file;
@@ -113,8 +114,9 @@ static int audit_system(struct apk_database *db)
char name[PATH_MAX];
int done;
- list_for_each_entry(pkg, &db->installed.packages, installed_pkgs_list) {
- hlist_for_each_entry(diri, dn, &pkg->owned_dirs, pkg_dirs_list) {
+ list_for_each_entry(ipkg, &db->installed.packages, installed_pkgs_list) {
+ pkg = ipkg->pkg;
+ hlist_for_each_entry(diri, dn, &ipkg->owned_dirs, pkg_dirs_list) {
if (diri->dir->flags & APK_DBDIRF_PROTECTED)
continue;