Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakub Panek
aports
Commits
e1dff715
"git@gitlab.alpinelinux.org:sertonix/apk-tools.git" did not exist on "7158474f1ba2bd24c6a9b2b1bbd53984414c0343"
Commit
e1dff715
authored
15 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
abuild: initial support for versioned dependencies
parent
ec8fd835
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
abuild.in
+23
-10
23 additions, 10 deletions
abuild.in
with
23 additions
and
10 deletions
abuild.in
+
23
−
10
View file @
e1dff715
...
@@ -648,12 +648,12 @@ depparse_aports() {
...
@@ -648,12 +648,12 @@ depparse_aports() {
.
$i
.
$i
dir
=
${
i
%/APKBUILD
}
dir
=
${
i
%/APKBUILD
}
deps
=
deps
=
# filter out conflicts from deps
# filter out conflicts from deps
and version info
for
j
in
$depends
$makedepends
;
do
for
j
in
$depends
$makedepends
;
do
case
"
$j
"
in
case
"
$j
"
in
!
*
)
continue
;;
!
*
)
continue
;;
esac
esac
deps
=
"
$deps
$
j
"
deps
=
"
$deps
$
{
j
%[<>=]*
}
"
done
done
for
j
in
$pkgname
$subpackages
;
do
for
j
in
$pkgname
$subpackages
;
do
echo
"o
${
j
%%
:
*
}
$dir
"
echo
"o
${
j
%%
:
*
}
$dir
"
...
@@ -672,7 +672,7 @@ depparse_aports() {
...
@@ -672,7 +672,7 @@ depparse_aports() {
deptrace
()
{
deptrace
()
{
local
deps
=
"
$@
"
local
deps
=
"
$@
"
[
-z
"
$deps
"
]
&&
d
eps
=
"
$BUILD_BASE
$depends
$makede
pen
ds
"
[
-z
"
$deps
"
]
&&
d
ie
"should not hap
pen"
(
depparse_aports
(
depparse_aports
if
[
-z
"
$upgrade
"
]
;
then
if
[
-z
"
$upgrade
"
]
;
then
# list installed pkgs and prefix with 'i '
# list installed pkgs and prefix with 'i '
...
@@ -704,15 +704,15 @@ deptrace() {
...
@@ -704,15 +704,15 @@ deptrace() {
# build and install dependencies
# build and install dependencies
builddeps
()
{
builddeps
()
{
local
deps alldeps pkg i
dir
ver missing installed_deps
local
deps
=
alldeps
=
pkg
=
i
=
dir
=
ver
=
missing
=
installed_deps
=
local
filtered_deps
=
[
-n
"
$nodeps
"
]
&&
return
0
[
-n
"
$nodeps
"
]
&&
return
0
msg
"Analyzing dependencies..."
msg
"Analyzing dependencies..."
deps
=
"
$BUILD_BASE
$makedepends
"
deps
=
"
$BUILD_BASE
$makedepends
"
# add depends unless it is a subpackage
# add depends unless it is a subpackage
for
i
in
$depends
;
do
for
i
in
$depends
;
do
subpackages_has
$
i
||
deps
=
"
$deps
$i
"
subpackages_has
$
{
i
%[<>=]*
}
||
deps
=
"
$deps
$i
"
done
done
installed_deps
=
$(
apk info
-e
$deps
)
installed_deps
=
$(
apk info
-e
$deps
)
...
@@ -721,7 +721,7 @@ builddeps() {
...
@@ -721,7 +721,7 @@ builddeps() {
if
[
"
${
i
#\!
}
"
!=
"
$i
"
]
;
then
if
[
"
${
i
#\!
}
"
!=
"
$i
"
]
;
then
list_has
${
i
#\!
}
$installed_deps
\
list_has
${
i
#\!
}
$installed_deps
\
&&
die
"Conflicting package
${
i
#\!
}
is installed."
&&
die
"Conflicting package
${
i
#\!
}
is installed."
elif
!
list_has
$i
$installed_deps
;
then
elif
!
dep
list_has
$i
$installed_deps
;
then
if
[
-z
"
$install_deps
"
]
&&
[
-z
"
$recursive
"
]
;
then
if
[
-z
"
$install_deps
"
]
&&
[
-z
"
$recursive
"
]
;
then
die
"Missing dependency
$i
. Use -r to autoinstall or -R to build"
die
"Missing dependency
$i
. Use -r to autoinstall or -R to build"
fi
fi
...
@@ -743,7 +743,7 @@ builddeps() {
...
@@ -743,7 +743,7 @@ builddeps() {
# find dependencies that are installed but missing in repo.
# find dependencies that are installed but missing in repo.
for
i
in
$deps
;
do
for
i
in
$deps
;
do
local
m
=
$(
apk search
--repo
"
$apkcache
"
$
i
)
local
m
=
$(
apk search
--repo
"
$apkcache
"
$
{
i
%[<>=]*
}
)
if
[
-z
"
$m
"
]
;
then
if
[
-z
"
$m
"
]
;
then
missing
=
"
$missing
$i
"
missing
=
"
$missing
$i
"
fi
fi
...
@@ -826,16 +826,29 @@ list_has() {
...
@@ -826,16 +826,29 @@ list_has() {
return
1
return
1
}
}
# same as list_has but we filter version info
deplist_has
()
{
local
needle
=
"
$1
"
local
i
shift
for
i
in
$@
;
do
i
=
${
i
%[<>=]*
}
[
"
$needle
"
=
"
$i
"
]
&&
return
0
[
"
$needle
"
=
"!
$i
"
]
&&
return
1
done
return
1
}
options_has
()
{
options_has
()
{
list_has
"
$1
"
$options
list_has
"
$1
"
$options
}
}
depends_has
()
{
depends_has
()
{
list_has
"
$1
"
$depends
dep
list_has
"
$1
"
$depends
}
}
makedepends_has
()
{
makedepends_has
()
{
list_has
"
$1
"
$makedepends
dep
list_has
"
$1
"
$makedepends
}
}
md5sums_has
()
{
md5sums_has
()
{
...
...
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