Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
27
Issues
27
List
Boards
Labels
Service Desk
Milestones
Merge Requests
19
Merge Requests
19
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
df83f78d
Commit
df83f78d
authored
Oct 02, 2012
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: check is so: provides are provided by own subpackage
parent
3bd23889
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
abuild.in
abuild.in
+15
-24
No files found.
abuild.in
View file @
df83f78d
...
...
@@ -858,10 +858,14 @@ find_so_files() {
return
0
}
subpkg_provides
()
{
grep
-q
-w
"^
$1
"
"
$pkgbasedir
"
/.control.
*
/.provides-so 2>/dev/null
}
trace_apk_deps
()
{
local
name
=
"
$1
"
local dir
=
"
$2
"
local
i
=
j
=
found
=
autodeps
=
deppkgs
=
missing
=
so_paths
=
self_provided
=
local
i
=
found
=
autodeps
=
deppkgs
=
missing
=
msg
"Tracing dependencies..."
# add pkgconfig if usr/lib/pkgconfig is found
if
[
-d
"
$pkgbasedir
"
/
$name
/usr/lib/pkgconfig
]
\
...
...
@@ -877,42 +881,29 @@ trace_apk_deps() {
msg
" added libgcc (due to libpthread)"
fi
[
-f
"
$dir
"
/.needs-so
]
&&
for
i
in
$(
cat
"
$dir
"
/.needs-so
)
;
do
found
=
# first check if its provide by same apkbuild
for
j
in
"
$dir
"
/../.control.
*
/.provides-so
;
do
grep
-q
-w
"^
$i
"
"
$j
"
||
continue
found
=
${
j
%/.provides-so
}
found
=
${
found
##*/.control.
}
break
done
if
[
-n
"
$found
"
]
;
then
if
!
list_has
"
$found
"
$self_provided
;
then
self_provided
=
"
$self_provided
$found
"
fi
# first check if its provided by same apkbuild
grep
-q
-w
"^
$i
"
"
$dir
"
/.provides-so 2>/dev/null
&&
continue
if
subpkg_provides
"
$i
"
||
$APK
info
-q
-e
"so:
$i
"
;
then
autodeps
=
"
$autodeps
so:
$i
"
else
if
$APK
info
--quiet
--installed
"so:
$i
"
;
then
autodeps
=
"
$autodeps
so:
$i
"
else
missing
=
"
$missing
$i
"
fi
missing
=
"
$missing
$i
"
fi
done
# find all packages that holds the so files
if
[
-f
"
$dir
"
/.rpaths
]
;
then
so_files
=
$(
find_so_files
"
$dir
"
/.rpaths
$missing
)
||
return
1
local
so_files
=
$(
find_so_files
"
$dir
"
/.rpaths
$missing
)
\
||
return
1
deppkgs
=
$(
$APK
info
-q
-W
$so_files
)
||
return
1
fi
for
found
in
$
self_provided
$
deppkgs
;
do
for
found
in
$deppkgs
;
do
if
grep
-w
"^depend =
${
found
}
$"
"
$dir
"
/.PKGINFO
>
/dev/null
;
then
warning
"You can remove '
$found
' from depends"
continue
fi
if
[
"
$found
"
!=
"
$name
"
]
&&
!
list_has
"
$found
"
$autodeps
;
then
autodeps
=
"
$autodeps
$found
"
msg
" added
$found
"
fi
autodeps
=
"
$autodeps
$found
"
done
echo
"# automatically detected:"
>>
"
$dir
"
/.PKGINFO
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment