aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/0001-lua-adapt-to-new-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/apk-tools/0001-lua-adapt-to-new-API.patch')
-rw-r--r--main/apk-tools/0001-lua-adapt-to-new-API.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/main/apk-tools/0001-lua-adapt-to-new-API.patch b/main/apk-tools/0001-lua-adapt-to-new-API.patch
new file mode 100644
index 0000000000..9e60ef1b7e
--- /dev/null
+++ b/main/apk-tools/0001-lua-adapt-to-new-API.patch
@@ -0,0 +1,32 @@
+From bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 20 Oct 2011 12:43:12 +0000
+Subject: [PATCH] lua: adapt to new API
+
+Use new apk_blob_pull_dep instead of the old apk_dep_from_blob
+---
+ src/lua-apk.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/lua-apk.c b/src/lua-apk.c
+index 845d67a..e41e785 100644
+--- a/src/lua-apk.c
++++ b/src/lua-apk.c
+@@ -204,10 +204,11 @@ static int Papk_exists(lua_State *L)
+ struct apk_dependency dep;
+ struct apk_name *name;
+ struct apk_package *pkg;
+- int i, r;
++ int i;
++ apk_blob_t blob = APK_BLOB_STR(depstr);
++ apk_blob_pull_dep(&blob, db, &dep);
+
+- r = apk_dep_from_blob(&dep, db, APK_BLOB_STR(depstr));
+- if (r != 0)
++ if (APK_BLOB_IS_NULL(blob))
+ goto ret_nil;
+
+ name = dep.name;
+--
+1.7.7
+