Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apk-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hassan Albahri
apk-tools
Commits
fd812dc7
Commit
fd812dc7
authored
13 years ago
by
Timo Teräs
Browse files
Options
Downloads
Patches
Plain Diff
lua: fix bindings, and build by default
parent
ef53dd52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Makefile
+1
-0
1 addition, 0 deletions
src/Makefile
src/lua-apk.c
+3
-10
3 additions, 10 deletions
src/lua-apk.c
with
4 additions
and
10 deletions
src/Makefile
+
1
−
0
View file @
fd812dc7
PKGDEPS
:=
openssl zlib
PKG_CONFIG
?=
pkg-config
LUAAPK
?=
yes
# lua module
ifneq
($(LUAAPK),)
...
...
This diff is collapsed.
Click to expand it.
src/lua-apk.c
+
3
−
10
View file @
fd812dc7
...
...
@@ -202,25 +202,18 @@ static int Papk_exists(lua_State *L)
struct
apk_database
*
db
=
checkdb
(
L
,
1
);
const
char
*
depstr
=
luaL_checkstring
(
L
,
2
);
struct
apk_dependency
dep
;
struct
apk_name
*
name
;
struct
apk_package
*
pkg
;
int
i
;
apk_blob_t
blob
=
APK_BLOB_STR
(
depstr
);
apk_blob_pull_dep
(
&
blob
,
db
,
&
dep
);
if
(
APK_BLOB_IS_NULL
(
blob
)
||
blob
.
len
>
0
)
goto
ret_nil
;
name
=
dep
.
name
;
for
(
i
=
0
;
i
<
name
->
pkgs
->
num
;
i
++
)
{
pkg
=
name
->
pkgs
->
item
[
i
];
if
(
pkg
->
ipkg
!=
NULL
)
break
;
}
if
(
i
>=
name
->
pkgs
->
num
)
pkg
=
apk_pkg_get_installed
(
dep
.
name
);
if
(
pkg
==
NULL
)
goto
ret_nil
;
if
(
!
apk_dep_is_
s
at
isfi
ed
(
&
dep
,
pkg
))
if
(
!
apk_dep_is_
m
at
erialized_or_provid
ed
(
&
dep
,
pkg
))
goto
ret_nil
;
return
push_package
(
L
,
pkg
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment