Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adélie Linux
abuild
Commits
21730b78
Commit
21730b78
authored
Dec 30, 2010
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild: fix check for arch specific binaries
we now fail if noarch is set wrong
parent
650c0344
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
18 deletions
+32
-18
abuild.in
abuild.in
+32
-18
No files found.
abuild.in
View file @
21730b78
...
...
@@ -483,10 +483,38 @@ prepare_tracedeps() {
done
}
# check if dir has arch specific binaries
dir_has_arch_binaries
()
{
local dir
=
"
$1
"
# if scanelf returns something, then we have binaries
[
-n
"
$(
scanelf
-R
"
$dir
"
|
head
-n
1
)
"
]
&&
return
0
# look for static *.a
[
-n
"
$(
find
"
$dir
"
-type
f
-name
'*.a'
|
head
-n
1
)
"
]
&&
return
0
return
1
}
# check that noarch is set if needed
archcheck
()
{
options_has
"!archcheck"
&&
return
0
if
dir_has_arch_binaries
"
${
subpkgdir
:-
$pkgdir
}
"
;
then
[
"
$arch
"
!=
"noarch"
]
&&
return
0
error
"Arch specific binaries found so arch must not be set to
\"
noarch
\"
"
return
1
else
[
"
$arch
"
=
"noarch"
]
&&
return
0
error
"No arch specific binaries found so arch should be set to
\"
noarch
\"
"
return
1
fi
return
0
}
prepare_package
()
{
msg
"Preparing
${
subpkgname
:+sub
}
package
${
subpkgname
:-
$pkgname
}
..."
stripbin
prepare_metafiles
&&
prepare_tracedeps
prepare_metafiles
&&
prepare_tracedeps
||
return
1
archcheck
}
pkginfo_val
()
{
...
...
@@ -576,21 +604,6 @@ trace_apk_deps() {
done
}
# check that noarch is set if needed
arch_check
()
{
local
name
=
$1
local dir
=
"
$2
"
if
[
-z
"
$(
scanelf
-R
"
$dir
"
|
head
-n
1
)
"
]
;
then
[
"
$arch
"
=
"noarch"
]
&&
return
0
warning
"No elf files found for
$name
so arch should probably be set to
\"
noarch
\"
"
else
[
"
$arch
"
!=
"noarch"
]
&&
return
0
error
"Elf files found so arch must not be set to
\"
noarch
\"
"
return
1
fi
return
0
}
create_apks
()
{
local
file
getpkgver
||
return
1
...
...
@@ -601,7 +614,6 @@ create_apks() {
local
apk
=
$name
-
$ver
.apk
local
datadir
=
"
$pkgbasedir
"
/
$name
arch_check
"
$name
"
"
$datadir
"
||
return
1
trace_apk_deps
"
$name
"
"
$dir
"
||
return
1
msg
"Creating
$apk
..."
(
...
...
@@ -1007,7 +1019,9 @@ checksum() {
stripbin
()
{
local
bin
options_has
"!strip"
&&
return
0
if
options_has
"!strip"
||
[
"
$arch
"
=
"noarch"
]
;
then
return
0
fi
cd
"
${
subpkgdir
:-
$pkgdir
}
"
||
return
1
msg
"Stripping binaries"
scanelf
--recursive
--nobanner
--etype
"ET_DYN,ET_EXEC"
.
\
...
...
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