diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-20 12:47:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-20 12:47:36 +0000 |
commit | 0f297032cdf827b77fdbafd3f831018c2aff8f8d (patch) | |
tree | c7b0abe2628307ccd4e849d23bf9509fadf894de | |
parent | 378a5e642e7d3cdca4b8bd6ca110c9161dd4fff2 (diff) | |
download | alpine_aports-0f297032cdf827b77fdbafd3f831018c2aff8f8d.tar.bz2 alpine_aports-0f297032cdf827b77fdbafd3f831018c2aff8f8d.tar.xz alpine_aports-0f297032cdf827b77fdbafd3f831018c2aff8f8d.zip |
main/apk-tools: fix lua module
-rw-r--r-- | main/apk-tools/0001-lua-adapt-to-new-API.patch | 32 | ||||
-rw-r--r-- | main/apk-tools/APKBUILD | 6 |
2 files changed, 36 insertions, 2 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 @@ | |||
1 | From bd0242e1de1c21d4d58cfd86e98b223b6e3e7e12 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Thu, 20 Oct 2011 12:43:12 +0000 | ||
4 | Subject: [PATCH] lua: adapt to new API | ||
5 | |||
6 | Use new apk_blob_pull_dep instead of the old apk_dep_from_blob | ||
7 | --- | ||
8 | src/lua-apk.c | 7 ++++--- | ||
9 | 1 files changed, 4 insertions(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/src/lua-apk.c b/src/lua-apk.c | ||
12 | index 845d67a..e41e785 100644 | ||
13 | --- a/src/lua-apk.c | ||
14 | +++ b/src/lua-apk.c | ||
15 | @@ -204,10 +204,11 @@ static int Papk_exists(lua_State *L) | ||
16 | struct apk_dependency dep; | ||
17 | struct apk_name *name; | ||
18 | struct apk_package *pkg; | ||
19 | - int i, r; | ||
20 | + int i; | ||
21 | + apk_blob_t blob = APK_BLOB_STR(depstr); | ||
22 | + apk_blob_pull_dep(&blob, db, &dep); | ||
23 | |||
24 | - r = apk_dep_from_blob(&dep, db, APK_BLOB_STR(depstr)); | ||
25 | - if (r != 0) | ||
26 | + if (APK_BLOB_IS_NULL(blob)) | ||
27 | goto ret_nil; | ||
28 | |||
29 | name = dep.name; | ||
30 | -- | ||
31 | 1.7.7 | ||
32 | |||
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD index bdb79fd40e..7f0d723b77 100644 --- a/main/apk-tools/APKBUILD +++ b/main/apk-tools/APKBUILD | |||
@@ -1,12 +1,13 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=apk-tools | 2 | pkgname=apk-tools |
3 | pkgver=2.2.0_pre1 | 3 | pkgver=2.2.0_pre1 |
4 | pkgrel=0 | 4 | pkgrel=1 |
5 | pkgdesc="Alpine Package Keeper - package manager for alpine" | 5 | pkgdesc="Alpine Package Keeper - package manager for alpine" |
6 | subpackages="$pkgname-static lua-apk:luaapk" | 6 | subpackages="$pkgname-static lua-apk:luaapk" |
7 | depends= | 7 | depends= |
8 | makedepends="zlib-dev openssl-dev lua-dev" | 8 | makedepends="zlib-dev openssl-dev lua-dev" |
9 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 | 9 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 |
10 | 0001-lua-adapt-to-new-API.patch | ||
10 | " | 11 | " |
11 | 12 | ||
12 | url="http://git.alpinelinux.org/cgit/apk-tools/" | 13 | url="http://git.alpinelinux.org/cgit/apk-tools/" |
@@ -54,4 +55,5 @@ luaapk() { | |||
54 | mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/ | 55 | mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/ |
55 | } | 56 | } |
56 | 57 | ||
57 | md5sums="cda5172b66e7778b855dfda44e5f174f apk-tools-2.2.0_pre1.tar.bz2" | 58 | md5sums="cda5172b66e7778b855dfda44e5f174f apk-tools-2.2.0_pre1.tar.bz2 |
59 | 8ba03addeab7c2aa534f311e921191ae 0001-lua-adapt-to-new-API.patch" | ||