summaryrefslogtreecommitdiff
path: root/src/info.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-01-12 14:33:29 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-01-12 14:33:29 +0200
commit1f9a36de6828b87ba9d7dedcae2de6092eed4f41 (patch)
treef928b3e94711951f603624a19924c290da362b8a /src/info.c
parent30965aa86735f7d2dcd544bae0b788195c51f336 (diff)
downloadapk-tools-1f9a36de6828b87ba9d7dedcae2de6092eed4f41.tar.gz
apk-tools-1f9a36de6828b87ba9d7dedcae2de6092eed4f41.tar.bz2
apk-tools-1f9a36de6828b87ba9d7dedcae2de6092eed4f41.tar.xz
apk-tools-1f9a36de6828b87ba9d7dedcae2de6092eed4f41.zip
db: support line feed as 'world' dependency separator
* default writing the world with spaces if a space is found (for backwards compatibility) for now
Diffstat (limited to 'src/info.c')
-rw-r--r--src/info.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/info.c b/src/info.c
index 25731cc..28ce855 100644
--- a/src/info.c
+++ b/src/info.c
@@ -75,7 +75,11 @@ static int info_exists(struct info_ctx *ctx, struct apk_database *db,
for (i = 0; i < argc; i++) {
apk_blob_t b = APK_BLOB_STR(argv[i]);
+
apk_blob_pull_dep(&b, db, &dep);
+ if (APK_BLOB_IS_NULL(b) || b.len > 0)
+ continue;
+
name = dep.name;
if (name == NULL)
continue;
@@ -131,7 +135,7 @@ static int info_who_owns(struct info_ctx *ctx, struct apk_database *db,
struct apk_ostream *os;
os = apk_ostream_to_fd(STDOUT_FILENO);
- apk_deps_write(db, deps, os);
+ apk_deps_write(db, deps, os, APK_BLOB_PTR_LEN(" ", 1));
os->write(os, "\n", 1);
os->close(os);
}