abuild: run postcheck for subpackages as well
This commit is contained in:
parent
92af0b8697
commit
d66a5ee456
37
abuild.in
37
abuild.in
@ -536,6 +536,25 @@ get_split_func() {
|
|||||||
echo $func
|
echo $func
|
||||||
}
|
}
|
||||||
|
|
||||||
|
postcheck() {
|
||||||
|
local dir="$1" name="$2" i=
|
||||||
|
msg "Running postcheck for $name"
|
||||||
|
# look for *.la files
|
||||||
|
i=$(find "$dir" -name '*.la' | sed "s|^$dir|\t|")
|
||||||
|
if [ -n "$i" ] && ! options_has "libtool"; then
|
||||||
|
error "Libtool archives (*.la) files found and \$options has no 'libtool' flag:"
|
||||||
|
echo "$i"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
# check directory permissions
|
||||||
|
i=$(find "$dir" -type d -perm -777 | sed "s|^$dir|\t|")
|
||||||
|
if [ -n "$i" ]; then
|
||||||
|
warning "World writeable directories found:"
|
||||||
|
echo "$i"
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
prepare_subpackages() {
|
prepare_subpackages() {
|
||||||
local i
|
local i
|
||||||
cd "$startdir"
|
cd "$startdir"
|
||||||
@ -543,27 +562,17 @@ prepare_subpackages() {
|
|||||||
local func=$(get_split_func $i)
|
local func=$(get_split_func $i)
|
||||||
# call abuild recursively, setting subpkg{dir,name}
|
# call abuild recursively, setting subpkg{dir,name}
|
||||||
msg "Running split function $func..."
|
msg "Running split function $func..."
|
||||||
subpkgdir="$pkgbasedir/${i%:*}" subpkgname="${i%:*}" \
|
local dir="$pkgbasedir/${i%:*}" name="${i%:*}"
|
||||||
|
subpkgdir="$dir" subpkgname="$name" \
|
||||||
$0 $func prepare_package || return 1
|
$0 $func prepare_package || return 1
|
||||||
|
postcheck "$dir" "$name" || return 1
|
||||||
done
|
done
|
||||||
# post check
|
postcheck "$pkgdir" "$pkgname" || return 1
|
||||||
i=$(find "$pkgdir" -name '*.la' | sed "s|^$pkgdir|\t|")
|
|
||||||
if [ -n "$i" ] && ! options_has "libtool"; then
|
|
||||||
error "Libtool archives (*.la) files found and \$options has no 'libtool' flag:"
|
|
||||||
echo "$i"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
# post check for /usr/share/locale
|
# post check for /usr/share/locale
|
||||||
if [ -d "$pkgdir"/usr/share/locale ]; then
|
if [ -d "$pkgdir"/usr/share/locale ]; then
|
||||||
warning "Found /usr/share/locale"
|
warning "Found /usr/share/locale"
|
||||||
warning2 "Maybe add \$pkgname-lang to subpackages?"
|
warning2 "Maybe add \$pkgname-lang to subpackages?"
|
||||||
fi
|
fi
|
||||||
# check directory permissions
|
|
||||||
i=$(find "$pkgdir" -type d -perm -777 | sed "s|^$pkgdir|\t|")
|
|
||||||
if [ -n "$i" ]; then
|
|
||||||
warning "World writeable directories found:"
|
|
||||||
echo "$i"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default_lang() {
|
default_lang() {
|
||||||
|
Reference in New Issue
Block a user