summaryrefslogtreecommitdiff
path: root/src/add.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-12-14 19:51:16 +0200
committerTimo Teräs <timo.teras@iki.fi>2010-12-14 19:51:16 +0200
commit972bec32101fb6d03f82fdf1f3be6106097fbf37 (patch)
tree532e989e0b13f2d0659426b3f385265240efc524 /src/add.c
parentfca1c30b801537ce35c1e4aa50331ae52c9bf567 (diff)
downloadapk-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/add.c b/src/add.c
index f13215a..5f5f6c7 100644
--- a/src/add.c
+++ b/src/add.c
@@ -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;