diff options
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c index 5aa4a67..a4d4e3a 100644 --- a/src/package.c +++ b/src/package.c @@ -1108,8 +1108,7 @@ static int write_depends(struct apk_ostream *os, const char *field, return 0; } -int apk_pkg_write_index_entry(struct apk_package *info, - struct apk_ostream *os) +int apk_pkg_write_index_header(struct apk_package *info, struct apk_ostream *os) { char buf[2048]; apk_blob_t bbuf = APK_BLOB_BUF(buf); @@ -1172,6 +1171,13 @@ int apk_pkg_write_index_entry(struct apk_package *info, return 0; } +int apk_pkg_write_index_entry(struct apk_package *pkg, struct apk_ostream *os) +{ + int r = apk_pkg_write_index_header(pkg, os); + if (r < 0) return r; + return apk_ostream_write(os, "\n", 1); +} + int apk_pkg_version_compare(const struct apk_package *a, const struct apk_package *b) { if (a->version == b->version) |