summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-06-01 11:49:32 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-06-01 11:49:32 +0300
commit038b672061919296b68b83a1ccead9c31b650c6c (patch)
tree277f16e61f937139d61e36b2d7b468ddbb87f536 /src/blob.c
parent2165547badcc26be1a0fcb2944f11c0bfea25d8a (diff)
downloadapk-tools-038b672061919296b68b83a1ccead9c31b650c6c.tar.gz
apk-tools-038b672061919296b68b83a1ccead9c31b650c6c.tar.bz2
apk-tools-038b672061919296b68b83a1ccead9c31b650c6c.tar.xz
apk-tools-038b672061919296b68b83a1ccead9c31b650c6c.zip
state: improve error messages from dependency failures
Print more information why installation changeset calculation failed. Fixes #187.
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c
index 0b6efbf..83bcf80 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -98,6 +98,14 @@ int apk_blob_split(apk_blob_t blob, apk_blob_t split, apk_blob_t *l, apk_blob_t
}
}
+apk_blob_t apk_blob_pushed(apk_blob_t buffer, apk_blob_t left)
+{
+ if (buffer.ptr + buffer.len != left.ptr + left.len)
+ return APK_BLOB_NULL;
+
+ return APK_BLOB_PTR_LEN(buffer.ptr, left.ptr - buffer.ptr);
+}
+
unsigned long apk_blob_hash_seed(apk_blob_t blob, unsigned long seed)
{
unsigned long hash = seed;