Skip to content
Snippets Groups Projects
Commit 1c589508 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/apk-tools: work around bug in lua-apk

parent 7cb69f3c
No related merge requests found
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
pkgver=2.10.4
pkgrel=0
pkgrel=1
pkgdesc="Alpine Package Keeper - package manager for alpine"
subpackages="$pkgname-static"
depends=
makedepends_build="openssl"
makedepends_host="zlib-dev openssl-dev linux-headers"
makedepends_host="zlib-dev openssl-dev openssl-static linux-headers"
makedepends="$makedepends_build $makedepends_host"
if [ "$CBUILD" = "$CHOST" ]; then
subpackages="$subpackages lua5.2-apk:luaapk"
makedepends="$makedepends lua5.2-dev"
fi
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz
lua-apk_time.patch
"
url="https://git.alpinelinux.org/cgit/apk-tools/"
......@@ -82,4 +83,5 @@ luaapk() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/lib/
}
sha512sums="d2d9fde0aae9059236f68a3fc2f2186104bb9a099b15d296a6202a20ab2912638f10bb3b9edb70f359d060c5839573c3d50ef37d13095fa01c66dc3219ab6e39 apk-tools-2.10.4.tar.xz"
sha512sums="d2d9fde0aae9059236f68a3fc2f2186104bb9a099b15d296a6202a20ab2912638f10bb3b9edb70f359d060c5839573c3d50ef37d13095fa01c66dc3219ab6e39 apk-tools-2.10.4.tar.xz
7751f4ddbf3f1b14f5d70ea0f8c2f78168d6138272f883fe1c0137ed135c3f3639f4bf2860dbf6b6de0d4321c93ec9c150edaf5f496c4dc0fedd0a201f399599 lua-apk_time.patch"
diff --git a/src/lua-apk.c b/src/lua-apk.c
index 532577a..26129fb 100644
--- a/src/lua-apk.c
+++ b/src/lua-apk.c
@@ -37,6 +37,15 @@ struct flagmap opendb_flagmap[] = {
{NULL, 0}
};
+time_t apk_time(void)
+{
+#ifdef TEST_MODE
+ return 1559567666;
+#else
+ return time(NULL);
+#endif
+}
+
/* implemented as luaL_typerror until lua 5.1, dropped in 5.2
* (C) 1994-2012 Lua.org, PUC-Rio. MIT license
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment