summaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-03-17 13:19:06 +0200
committerTimo Teras <timo.teras@iki.fi>2009-03-17 13:19:06 +0200
commit7735cc644d342e39b8b2b71da6890656d1846fab (patch)
tree8f180bd7fde819b744d98d2859f502707a97e187 /src/database.c
parent57391d1e4c4b8464ca14b464cc6c29987922fe88 (diff)
downloadapk-tools-7735cc644d342e39b8b2b71da6890656d1846fab.tar.bz2
apk-tools-7735cc644d342e39b8b2b71da6890656d1846fab.tar.xz
pkg: write dependencies directly file instead of buffer
So we don't get artificial limits on the amount of dependencies (fixes #8).
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/database.c b/src/database.c
index 27b49ea..976102b 100644
--- a/src/database.c
+++ b/src/database.c
@@ -725,8 +725,6 @@ struct write_ctx {
static int apk_db_write_config(struct apk_database *db)
{
struct apk_ostream *os;
- char buf[1024];
- int n;
if (db->root == NULL)
return 0;
@@ -741,10 +739,8 @@ static int apk_db_write_config(struct apk_database *db)
os = apk_ostream_to_file("var/lib/apk/world", 0644);
if (os == NULL)
return -1;
- n = apk_deps_format(buf, sizeof(buf), db->world);
- if (n < sizeof(buf))
- buf[n++] = '\n';
- os->write(os, buf, n);
+ apk_deps_write(db->world, os);
+ os->write(os, "\n", 1);
os->close(os);
os = apk_ostream_to_file("var/lib/apk/installed.new", 0644);