diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 14:24:34 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-06-17 14:38:27 +0300 |
commit | 9d100378074d21f99dc26bae8417932dc110664e (patch) | |
tree | e66829190a5648b146698e372b2a9403d535f866 /src/package.c | |
parent | dbb642206d2ef73c5428a04cb10bb27e7cdd3b29 (diff) | |
download | apk-tools-9d100378074d21f99dc26bae8417932dc110664e.tar.gz apk-tools-9d100378074d21f99dc26bae8417932dc110664e.tar.bz2 apk-tools-9d100378074d21f99dc26bae8417932dc110664e.tar.xz apk-tools-9d100378074d21f99dc26bae8417932dc110664e.zip |
db: refactor repository file construction
Fixes also 'fetch' applet to prefer copying/linking to files from
cache if possible.
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/package.c b/src/package.c index 0fca1db..61927e7 100644 --- a/src/package.c +++ b/src/package.c @@ -53,29 +53,6 @@ struct apk_package *apk_pkg_get_installed(struct apk_name *name) return NULL; } -void apk_pkg_format_plain(struct apk_package *pkg, apk_blob_t to) -{ - /* pkgname-1.0.apk */ - apk_blob_push_blob(&to, APK_BLOB_STR(pkg->name->name)); - apk_blob_push_blob(&to, APK_BLOB_STR("-")); - apk_blob_push_blob(&to, *pkg->version); - apk_blob_push_blob(&to, APK_BLOB_STR(".apk")); - apk_blob_push_blob(&to, APK_BLOB_PTR_LEN("", 1)); -} - -void apk_pkg_format_cache(struct apk_package *pkg, apk_blob_t to) -{ - /* pkgname-1.0_alpha1.12345678.apk */ - apk_blob_push_blob(&to, APK_BLOB_STR(pkg->name->name)); - apk_blob_push_blob(&to, APK_BLOB_STR("-")); - apk_blob_push_blob(&to, *pkg->version); - apk_blob_push_blob(&to, APK_BLOB_STR(".")); - apk_blob_push_hexdump(&to, APK_BLOB_PTR_LEN((char *) pkg->csum.data, - APK_CACHE_CSUM_BYTES)); - apk_blob_push_blob(&to, APK_BLOB_STR(".apk")); - apk_blob_push_blob(&to, APK_BLOB_PTR_LEN("", 1)); -} - struct apk_package *apk_pkg_new(void) { struct apk_package *pkg; |