Commit 0db502b9 authored by Natanael Copa's avatar Natanael Copa

abuild: only warn when we think there should have been noarch

and we dont want -dev packages to be noarch
parent 66966c5c
...@@ -566,6 +566,11 @@ dir_has_arch_binaries() { ...@@ -566,6 +566,11 @@ dir_has_arch_binaries() {
return 1 return 1
} }
# returns true if this is the -dev package
is_dev_pkg() {
test "${subpkgname%-dev}" != "$subpkgname"
}
# check that noarch is set if needed # check that noarch is set if needed
archcheck() { archcheck() {
options_has "!archcheck" && return 0 options_has "!archcheck" && return 0
...@@ -573,10 +578,9 @@ archcheck() { ...@@ -573,10 +578,9 @@ archcheck() {
[ "$arch" != "noarch" ] && return 0 [ "$arch" != "noarch" ] && return 0
error "Arch specific binaries found so arch must not be set to \"noarch\"" error "Arch specific binaries found so arch must not be set to \"noarch\""
return 1 return 1
else elif [ "$arch" != "noarch" ] && ! is_dev_pkg; then
[ "$arch" = "noarch" ] && return 0 # we dont want -dev package go to noarch
error "No arch specific binaries found so arch should be set to \"noarch\"" warning "No arch specific binaries found so arch should probably be set to \"noarch\""
return 1
fi fi
return 0 return 0
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment