diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-02-27 11:18:15 +0200 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-02-27 11:18:15 +0200 |
commit | 7027a7d844633a986f76c6401638acc8d277f0cb (patch) | |
tree | 8652bbb2d65a8565eca20d3380706be67ba28acd /src/database.c | |
parent | ca51ec323839598928fca85cec3bd3109fd32658 (diff) | |
download | apk-tools-7027a7d844633a986f76c6401638acc8d277f0cb.tar.gz apk-tools-7027a7d844633a986f76c6401638acc8d277f0cb.tar.bz2 apk-tools-7027a7d844633a986f76c6401638acc8d277f0cb.tar.xz apk-tools-7027a7d844633a986f76c6401638acc8d277f0cb.zip |
db: new apk to have separate install scripts for each action
Diffstat (limited to 'src/database.c')
-rw-r--r-- | src/database.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c index 743fd83..f6b66c4 100644 --- a/src/database.c +++ b/src/database.c @@ -969,9 +969,13 @@ static int apk_db_install_archive_entry(void *_ctx, /* Package metainfo and script processing */ if (ae->name[0] == '.') { /* APK 2.0 format */ - if (strcmp(ae->name, ".INSTALL") != 0) + if (strcmp(ae->name, ".INSTALL") == 0) + type = APK_SCRIPT_GENERIC; + else + type = apk_script_type(&ae->name[1]); + + if (type == APK_SCRIPT_INVALID) return 0; - type = APK_SCRIPT_GENERIC; } else if (strncmp(ae->name, "var/db/apk/", 11) == 0) { /* APK 1.0 format */ p = &ae->name[11]; |