diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-12-14 19:51:16 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-12-14 19:51:16 +0200 |
commit | 972bec32101fb6d03f82fdf1f3be6106097fbf37 (patch) | |
tree | 532e989e0b13f2d0659426b3f385265240efc524 /src/add.c | |
parent | fca1c30b801537ce35c1e4aa50331ae52c9bf567 (diff) | |
download | apk-tools-972bec32101fb6d03f82fdf1f3be6106097fbf37.tar.gz apk-tools-972bec32101fb6d03f82fdf1f3be6106097fbf37.tar.bz2 apk-tools-972bec32101fb6d03f82fdf1f3be6106097fbf37.tar.xz apk-tools-972bec32101fb6d03f82fdf1f3be6106097fbf37.zip |
various: use 'atoms' for certain package field and misc fixes
- implement a hash table for commonly shared fields such as
license, version and architecture
- use macroes to print blobs or pkgname-pkgver strings
- fix some old cruft
Diffstat (limited to 'src/add.c')
-rw-r--r-- | src/add.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -78,7 +78,7 @@ static int add_main(void *ctx, struct apk_database *db, int argc, char **argv) virtpkg->name = apk_db_get_name(db, APK_BLOB_STR(actx->virtpkg)); apk_blob_checksum(APK_BLOB_STR(virtpkg->name->name), apk_checksum_default(), &virtpkg->csum); - virtpkg->version = strdup("0"); + virtpkg->version = apk_blob_atomize(APK_BLOB_STR("0")); virtpkg->description = strdup("virtual meta package"); apk_dep_from_pkg(&virtdep, db, virtpkg); virtdep.name->flags |= APK_NAME_TOPLEVEL; |