summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-21 11:48:15 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-21 11:48:15 +0300
commita2fa544ac6a75f93d809e3457432618dd89376dd (patch)
tree16355536082cf87ee8e426e1fc4a808a2e463dbe /src
parent654ddbf05fac1adaa4b175372c594578ec967f7d (diff)
downloadapk-tools-a2fa544ac6a75f93d809e3457432618dd89376dd.tar.gz
apk-tools-a2fa544ac6a75f93d809e3457432618dd89376dd.tar.bz2
apk-tools-a2fa544ac6a75f93d809e3457432618dd89376dd.tar.xz
apk-tools-a2fa544ac6a75f93d809e3457432618dd89376dd.zip
db: write ipkg flags in proper place
Diffstat (limited to 'src')
-rw-r--r--src/database.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/database.c b/src/database.c
index 9572c0f..d4becb9 100644
--- a/src/database.c
+++ b/src/database.c
@@ -921,6 +921,14 @@ static int apk_db_write_fdb(struct apk_database *db, struct apk_ostream *os)
apk_blob_push_blob(&bbuf, db->repo_tags[ipkg->repository_tag].plain_name);
apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n"));
}
+ if (ipkg->broken_files || ipkg->broken_script) {
+ apk_blob_push_blob(&bbuf, APK_BLOB_STR("f:"));
+ if (ipkg->broken_files)
+ apk_blob_push_blob(&bbuf, APK_BLOB_STR("f"));
+ if (ipkg->broken_script)
+ apk_blob_push_blob(&bbuf, APK_BLOB_STR("s"));
+ apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n"));
+ }
hlist_for_each_entry(diri, c1, &ipkg->owned_dirs, pkg_dirs_list) {
apk_blob_push_blob(&bbuf, APK_BLOB_STR("F:"));
apk_blob_push_blob(&bbuf, APK_BLOB_PTR_LEN(diri->dir->name, diri->dir->namelen));
@@ -930,13 +938,6 @@ static int apk_db_write_fdb(struct apk_database *db, struct apk_ostream *os)
apk_blob_push_uint(&bbuf, diri->gid, 10);
apk_blob_push_blob(&bbuf, APK_BLOB_STR(":"));
apk_blob_push_uint(&bbuf, diri->mode, 8);
- if (ipkg->broken_files || ipkg->broken_script) {
- apk_blob_push_blob(&bbuf, APK_BLOB_STR("\nf:"));
- if (ipkg->broken_files)
- apk_blob_push_blob(&bbuf, APK_BLOB_STR("f"));
- if (ipkg->broken_script)
- apk_blob_push_blob(&bbuf, APK_BLOB_STR("s"));
- }
apk_blob_push_blob(&bbuf, APK_BLOB_STR("\n"));
hlist_for_each_entry(file, c2, &diri->owned_files, diri_files_list) {